Content

Post new topic Reply to topic

Particle System Guide

Author Message
Skatter #*&@%! View user's profile Send private message

Reply with quote Wednesday, September 07, 2011

I want to preface this small guide by saying that I’m probably the most ignorant member of this community, and it’s likely that either I’ll overlook something, make typos, do something wrong, be misinformed or any and all combinations of those.

I have included suggested changes to the system near the bottom. If I am simply misinformed and I'm doing something wrong, refer to the paragraph above this one, and change accordingly Very Happy

Something that hasn’t really been used much by the community (or really much of the current in-team attacks) is the particle system. ZEQ2-Lite uses a particle system written by RiO, that’s pretty darn customizable. With this small(certainly not all-inclusive) guide, I’m going to show how to set up your own particle effects and call them for use in an attack in your .grfx file Very Happy

I am going to assume that you’ve at least read over Forza’s .phys and .grfx editing guide in the forums. If not, go read that, then come back. Unless you’re familiar with editing those, then continue on.

http://ZEQ2.com/lite/forums/download.php?id=1265 <- Link to Forza’s guide!

Now, as of this edit, the manual for the particle system has been posted!

http://ZEQ2.com/lite/forums/viewtopic.php?p=89471#89471 <- Link to Zeth's post containing the Manual!

The example I’m going to use is the energy particles gathered by Yamucha for the Spirit ball.

This will work with models or sprites, although for this example we’ll be using sprites.

You will need to either create graphics or recycle current ones for use as particles.

We’re going to recycle the graphics for the Yellow Energy Ball that’s should be familiar as a generic attack.

Your particle effects file can be edited in notepad, and will be saved in the ZEQ2/effects folder as a .psys file. For this example, we’ll save it as Sokidan.psys.

Now, opening notepad, we’ll give our particle effect a name of “SokidanCharge” this is what will be called in the .grfx file later. I’m going to include my example as well as explain some different options.

Inside your particle effect, you’re going to call emitters. Emitters will emit(…I know, right?) the intended graphic, and there are several options to tweak to get the desired effect. You can call multiple emitters inside of each effect, but for now, we’ll use just one. See the Spirit Bomb in skillsGeneric.psys for more details on calling multiple emitters. The various options here control the type, timing, and other aspects of the particles being called. You can also link your emitter here. You can let it autolink, in which case it defaults to the link used by the default.grfx for that attack, you can link it to a tag, such as tag_right, or link it to an entity.
Inside the emitter is where you’ll call the particles you want to use. You can call multiple particles inside each emitter in much the same way you call multiple emitters. This is where you set the graphic you intend to use, as well as sizing it, speed, lifetime, and light (although it is overwritten by the light values in the default.grfx).

The force property is what tells the particles to move and in which direction. Each particle system can have multiple forces, but every emitter in that system will share the forces, meaning you want to keep your particle effects to a similar behavior.




SokidanCharge {

   Emitter {
      type sphere
      radius 40
      delay 2800
      period 500
      life 9000
      count 60
      link auto

      Particle {
         map "energyBallYellow"
         life 175
         mass 1
         speed 0.4
         scale .4
         rgba ( 1 1 1 1 )
         outRgba ( 1 1 1 1 ) 50
      }

   }

   Force {
      type spherical
      area sphere 10
      falloff 100
      amount -5

      link auto
   }
}




Now, we’ve set up our charge particles, and we’re able to move to the next step. We’ll open up Yamcha’s default.grfx file, and we’ll look in the Charge properties. Here, we’ll add the line loopParticles = “SokidanCharge” which will add our particles to the Charge animation for Yamcha’s sokidan.

It will look like this in your default.grfx:


private "sokidan" = "baseAttack"  {
   Charge {
      loopParticles = "SokidanCharge"
   }


Particle effects can be applied in other ways, as well. They can be added to a fire animation, and can be sustained, for example, the duration of a beam attack.



More detailed Information on Particle System Keywords:


Property   Type      Explanation
Emitter Properties

Property   String          What type of emitter to call
                           “point”, “radius”, “sphere”, “pointGround”, and                                     “radiusGround”

radius      integer      radius in which the emitter spawns particles.

delay      integer      delay before the particles spawn.

period      integer      interval between spawning more “waves” of the called                                  particles.

life      integer      how long the emitter lasts.

count      integer      how many particles spawn per “wave”

jitter      integer      the higher the number, the more erratically the                                 particles behave and shake

link      string      what the emitter links to.
                      “auto”, “tag “tag_weapon”” “entityname”


Particle Properties

type      string      type of particle being called by emitter
                     “ray”, “spark”, or “regular”(default)

map      string      maps your graphic shader to be emitted
                     map “exampleEffect”

model      string      calls a model to be emitted
                      model “Effects/Example/Example.skin”

life      integer      how long each individual particle in a “wave” lasts

mass      integer

scale      integer      size of the particles emitted

inScale   integer           takes scale value, and scales downward from it                                      by a time value, shrinking.
                                inScale   12 2

outScale   integer           takes scale value, and scales upward from it                                      by a time value, growing.
                                outScale   50 2


rgba      integer      lightsource, same values used in the default.grfx, however                         seems to be overwritten by default.grfx

inRgba      integer      Transition from rgba value to the value given in                               inRgba. Also seems to be overwritten by default.grfx

outRgba      intgeger   Transition from outRgba value to the value given in                               rgba. Also seems to be overwritten by default.grfx


Force Properties

type      string      Movement options.
                      “spherical”, “directional”, “drag”, or “spin”

area      string      type of area followed by numerical value
                      “area sphere 10” is an example of the spherical type’s area

falloff      integer      Allows falloff of particles. Example, a ray can keep                              moving beyond its intended radius

amount      integer      increment of motion, and direction. Negative numbers                             move inward or backward, positive numbers move outward                           or forward,depending on type of force chosen



Suggested Improvements:

Allowing for more Particles to be called under one command in the .grfx files. At the moment, two or more loopParticles are overwritten by the last one called, which will be the last one written in the default.grfx. Or at least moving force control to be subject to each emitter, rather than the particle system as a whole.

Fixing light sourcing through particle systems. At the moment, either the lighting doesn’t work, or is overwritten by whatever light source choices were made in the default.grfx. For instance, if you want to have your chargeup completely particle based, you’ll still need a sprite or model present in the charge properties, or the lighting won’t happen. Simply scale the model or sprite down to 0.01 or enough to make in invisible, while still retaining the lighting properties.

Allowing an emitter to emit a sound? For instance, if I set up a lightning bolt to emit once every 12 seconds, then every twelve seconds I could also have a lightning sound play alongside it, freeing up for more sound usage in the default.grfx.

This is more of a situation dealing with the default.grfx, but if no model or shader is given for the charge properties of an attack, the shader or model given for flash, missile, and explosion aren’t used. Also, if the model is scaled down as mentioned above, those given for flash, missile and explosion must be scaled up to compensate, or they’ll be invisible or miniature.

More of a low-priority, but allowing certain particles to anchor themselves in position relative to the player, rather than a single point out in the world. When moving quickly, particle effects with anything other than fleeting lifespans can’t keep up, making them appear awkward.



A link to this in Word Format (97-2003) so you don't have to come back here:
http://www.mediafire.com/?5m1qk3uu3z69ajn

And as an example of what you can do with the particle effects, you can see my progress on the Sokidan here:
http://www.moddb.com/games/zeq2lite/videos/spirit-ball-particle-effects#imagebox

Good luck, and I expect to see great things!

Linkxp500 View user's profile Send private message

Reply with quote Wednesday, September 07, 2011

Great guide! I will look more into it when I get back around noon here in Texas. I would love to see what I can do with this info. Thank you for posting this. Wink

RoganX Classy View user's profile Send private message

Reply with quote Wednesday, September 07, 2011

Very handy guide. By the way, your Yamucha Spirit Bomb looks awesome, loving the effects. That your own model? Cause the hair looks pretty good.

Skatter #*&@%! View user's profile Send private message

Reply with quote Wednesday, September 07, 2011

Great guide! I will look more into it when I get back around noon here in Texas. I would love to see what I can do with this info. Thank you for posting this.



You're welcome! I'm sure you guys will take this and do some amazing things with it!

Very handy guide. By the way, your Yamucha Spirit Bomb looks awesome, loving the effects. That your own model? Cause the hair looks pretty good.



Nope, it's just a Goku edit. Just waiting for the day that TRL's Yamucha is in-game. It's going to win for sure!

Post new topic Reply to topic

Actions

Online [ 0 / 6125]