Particle System Guide

Discussion in 'Mod Support' started by bgolus, January 20, 2015.

  1. killerkiwijuice

    killerkiwijuice Post Master General

    Messages:
    3,879
    Likes Received:
    3,597
    nope. just adjust the lifetime.
  2. Mirolog

    Mirolog Well-Known Member

    Messages:
    294
    Likes Received:
    405
    ok, and if I have a particle on the ground, is there any ways to make it dissapear more beautiful than just *pop, and it's gone* ?
  3. killerkiwijuice

    killerkiwijuice Post Master General

    Messages:
    3,879
    Likes Received:
    3,597
    Make an alpha key array:
    Code:
    "alpha": [
        [
            0,
            1
        ],
        [    0.9,
            1
        ],
        [
            1,
            0
        ]
    ]
    Place that in the particle spec.

    PS. Dont forget to add the comma at the end
    Mirolog likes this.
  4. bgolus

    bgolus Uber Alumni

    Messages:
    1,481
    Likes Received:
    2,299
    For things that are okay being semi-transparent, fade out alpha. If not you can use scale or a clip shader to "dissolve" the particle. There's also a shader added in the latest patch for dissolving out mesh particles. It's used on the orbital launch effect.
    cdrkf, Mirolog, crizmess and 2 others like this.
  5. Mirolog

    Mirolog Well-Known Member

    Messages:
    294
    Likes Received:
    405
    And one more thing:

    I have a couple of this -

    with different offsets. They spawn in orbit. And move towards eachother while falling. I tried adding velocity and making "offsetY" a time curve, but nothing changes. How I can manipulate their positions after spawn?
    yes im creating helios wreckage with particles, because reasons.
  6. killerkiwijuice

    killerkiwijuice Post Master General

    Messages:
    3,879
    Likes Received:
    3,597
    Wait I'm confused about what you're trying to accomplish. But if I understand correctly, you need to set radial (which doesn't mean radians, it means "circular" velocity) velocity to false.
  7. Mirolog

    Mirolog Well-Known Member

    Messages:
    294
    Likes Received:
    405
    I need a Helios made out of particles. This is code for one of the arms (big triangular things). I've used offsets and rotation to place them around center paticle (donut thing, it has teleporter). But I can't control particle movement after spawn, so these arms come closer and closer, when whole construction moves from orbit to surface.

    So I need to set radial velocity to false, and?..
  8. Mirolog

    Mirolog Well-Known Member

    Messages:
    294
    Likes Received:
    405
    [this was supposed to be edit, sry for doublepost)

    They come together not because of velocity, but because particles use spherical coordinate system.
    How can I add velocity to these particles?
  9. dom314

    dom314 Post Master General

    Messages:
    896
    Likes Received:
    1,196
    So if I understand correctly, the problem is because gravity points towards the center of the planet, not straight down. Instead of using gravity, try using accelZ instead.
  10. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    I dunno much about particles, but the center of the planet is 0/0/0. So if you accelerate downwards on Z, you just do what gravity does as well.
  11. dom314

    dom314 Post Master General

    Messages:
    896
    Likes Received:
    1,196
    The emitter coordinate system is not actually spherical. It is simply aligned with the event it spawned with (Z pointing up, Y pointing forward and X pointing to the side of the object). 0,0,0 is the origin of the event in terms of the emitter coordinate space.
    cola_colin likes this.
  12. bgolus

    bgolus Uber Alumni

    Messages:
    1,481
    Likes Received:
    2,299
    The offset values control the initial spawn location have no effect on the position of the particle after it's been spawned. The velocity, gravity, drag, and accel keys all control the positional movement of particles after they've spawned.

    Gravity and accelZ are different. Gravity will always pull particles down towards the center of the planet, regardless of the orientation of the emitter or if useWorldSpace is true or false.

    The accel keys are in the space the particles are in, so if useWorldSpace is false (or not specified) they'll move in the direction of the emitter's orientation. Usually emitters are spawned roughly with their Z coordinate upright, so it'll be similar to gravity, but not exactly the same. If useWorldSpace is true they'll move in the orientation of the planet (accelZ = -1 will send particles towards the south pole for example).
    cdrkf and cola_colin like this.
  13. bgolus

    bgolus Uber Alumni

    Messages:
    1,481
    Likes Received:
    2,299
  14. Alpha2546

    Alpha2546 Post Master General

    Messages:
    977
    Likes Received:
    1,561
    Hey @bgolus

    I've been playing around with hooking effects to a bone in the died event like the example below

    Code:
      "events": {
        "died": {
          "audio_cue": "/SE/Death/Veh",
          "effect_spec": "/mod/default_explosion_bot.pfx bone_root",
          "effect_scale": 3.0
        }
    Unfortunately effect scaling doesn't work when you hook it to a bone. Is this a bug or a design decision?
  15. bgolus

    bgolus Uber Alumni

    Messages:
    1,481
    Likes Received:
    2,299
    Neither? It simply isn't implemented. Unfortunately a lot of the effects related code isn't shared in the various places they get defined, so whether "effect_scale" does something or not is entirely due to if it ever got used, and thus I added support.
  16. Alpha2546

    Alpha2546 Post Master General

    Messages:
    977
    Likes Received:
    1,561
    Aah okay. Thanks for the response! I've already abandoned the idea of using the effect scaling and created multiple different effects for more variation. Bit more work but I guess it adds that extra polish too.

Share This Page