Feature Request: Turning off particle effects/simple particles

Discussion in 'Planetary Annihilation General Discussion' started by someonewhoisnobody, August 25, 2013.

  1. someonewhoisnobody

    someonewhoisnobody Well-Known Member

    Messages:
    657
    Likes Received:
    361
    So I have a decent computer that can run PA just fine. The problem is when your are building 20 factories and have countless fab bots all creating buildings the particle effects get pretty heavy and slow my game down to an almost unusable point. Would it be possible to have a option that turned on simple building particles were instead of 100 particles per fab bot it would be a solid line from the fab bot to the building that maybe moves a little.
  2. starworksart

    starworksart New Member

    Messages:
    2
    Likes Received:
    0
    I hope its possible..
  3. someonewhoisnobody

    someonewhoisnobody Well-Known Member

    Messages:
    657
    Likes Received:
    361
    I think it would be relatively simple, I do not understand how the game is programed but the particle effects are probably not built into every model's animation for building, they are probably a separate file that the engine calls when building things. The mod/feature would just require switching between the versions of the particles(simple or normal)
  4. bgolus

    bgolus Uber Alumni

    Messages:
    1,481
    Likes Received:
    2,299
    The particle system is something that needs more work, the current LOD system is a very simple on / off based on distance to the camera and that's it, and not too long ago it did less than that. o recently went through most of the effects to give them LOD distances.

    A better LOD system would change the number of particles rendered / emitted over distance based on screen resolution and some kind of user adjustable slider for performance, as well as eventually a quality level (turn off particle lights, turn off soft particles, etc.) Right now what you can do is go in to the particle .json files and change them yourself.

    All the particle system json files should be in: Planetary Annihilation\media\pa\effects\specs
    They have all of their white space removed, so you can reformat them to be readable using a tool like http://jsonlint.com/ or look at this thread: https://forums.uberent.com/threads/reformat-your-json-files.47529/

    The two key values you'll want to look for are "emissionRate" and "emissionBursts", most of the time it's just a single number value for each instance of those keywords, and you can just half or quarter the value. Sometimes they're a little more complex than that (you can specify the numbers in multi-point linear or constant curves), generally just look for the biggest number and change those.

    example:
    "fab_spray.json" is the nanolathe effect all of the units use. There are 3 occurences of "emissionRate" and one "emissionBursts". The first two "emissionRate" values are 100 and 30 (these are the main green particles and the less frequent yellow particles of the nanolathe respectively) and you can set these to any value you want. The third "emissionRate" is for the real time particle lights, you can set that to zero if you want. The single "emissionBursts" is a 1, this is the glow at the point of the fabrication tool itself and you can leave it alone.
    Last edited: August 26, 2013
    Gorbles and cola_colin like this.
  5. mushroomars

    mushroomars Well-Known Member

    Messages:
    1,655
    Likes Received:
    319
    This is possible for modders to do, but it would be a lot of work. You'd have to go in and modify every single JSON file for every single particle effect.

    I think Uber is working on a LOD system for particle effects, which is functionally exactly what you are asking for. Just give them some time, they might ad a LOD slider to the options menu.

    Edit: Mega-ninja'd by bgolus lol.
  6. someonewhoisnobody

    someonewhoisnobody Well-Known Member

    Messages:
    657
    Likes Received:
    361
    I just edited the fab particle file so that there are half as many particles which worked great. I just wanna say to all the Uber employes this game is really coming together into one awesome thing, great job :).
  7. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    hey uhmmm.. mind sharing your edit?
  8. someonewhoisnobody

    someonewhoisnobody Well-Known Member

    Messages:
    657
    Likes Received:
    361
    If I get a chance I will upload it. Its probably harder to download and replace it than it would be to edit yourself though. All you have to do is change 3 numbers.
  9. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    then paste the code
    Code:
    like this
    and tell me at what lines as I mod some I am used to this.
  10. someonewhoisnobody

    someonewhoisnobody Well-Known Member

    Messages:
    657
    Likes Received:
    361
    Alright here is the code, Replace fab_spray.json with the code below. It is in Planetary Annihilation\media\pa\effects\specs
    Code:
    { "emitters": [ { "spec": { "shader": "particle_transparent_ramp", "facing": "velocity", "red": 0, "green": 1, "blue": 0, "alpha": { "keys": [ [ 0, 0 ], [ 0.1, 1 ], [ 1, 1 ] ], "stepped": false }, "size": { "keys": [ [ 0, 0.75 ], [ 0.5, 1 ], [ 1, 0 ] ], "stepped": false }, "baseTexture": "/pa/effects/textures/particles/flat_tail.png", "rampTexture": "/pa/effects/textures/particles/uncompressed/no_ramp.png" }, "sizeX": 0.4, "sizeY": 1.6, "sizeRangeX": 0.1, "sizeRangeY": 0.2, "velocityY": -0.75, "velocityX": { "keys": [ [ 0, 0.08 ], [ 0.083, 0.05 ], [ 0.167, -0.05 ], [ 0.25, -0.08 ], [ 0.33, -0.05 ], [ 0.41, 0.05 ], [ 0.5, 0.08 ], [ 0.583, 0.05 ], [ 0.667, -0.05 ], [ 0.75, -0.08 ], [ 0.83, -0.05 ], [ 0.91, 0.05 ], [ 1, 0.08 ], [ 1.083, 0.05 ], [ 1.167, -0.05 ], [ 1.25, -0.08 ], [ 1.33, -0.05 ], [ 1.41, 0.05 ], [ 1.5, 0.08 ], [ 1.583, 0.05 ], [ 1.667, -0.05 ], [ 1.75, -0.08 ], [ 1.83, -0.05 ], [ 1.91, 0.05 ], [ 2, 0.08 ] ], "stepped": false }, "velocityZ": { "keys": [ [ 0, 0 ], [ 0.042, -0.05 ], [ 0.125, -0.08 ], [ 0.208, -0.05 ], [ 0.292, 0.05 ], [ 0.375, 0.08 ], [ 0.458, 0.05 ], [ 0.542, -0.05 ], [ 0.625, -0.08 ], [ 0.708, -0.05 ], [ 0.792, 0.05 ], [ 0.875, 0.08 ], [ 0.958, 0.05 ], [ 1.042, -0.05 ], [ 1.125, -0.08 ], [ 1.208, -0.05 ], [ 1.292, 0.05 ], [ 1.375, 0.08 ], [ 1.458, 0.05 ], [ 1.542, -0.05 ], [ 1.625, -0.08 ], [ 1.708, -0.05 ], [ 1.792, 0.05 ], [ 1.875, 0.08 ], [ 1.958, 0.05 ], [ 2, 0 ] ], "stepped": false }, "velocityRangeX": 0.04, "velocityRangeZ": 0.04, "velocity": 20, "velocityRange": 2.5, "emissionRate": 50, "rotationRange": 0, "lifetime": 1, "lifetimeRange": 0.3, "emitterLifetime": 2, "maxParticles": 500, "useWorldSpace": true, "endDistance": 600 }, { "spec": { "shader": "particle_transparent", "facing": "velocity", "red": 0.75, "green": 1, "blue": 0.2, "alpha": { "keys": [ [ 0, 0 ], [ 0.1, 1 ], [ 0.5, 1 ], [ 1, 1 ] ], "stepped": false }, "size": { "keys": [ [ 0, 0.75 ], [ 0.5, 1.25 ], [ 1, 0 ] ], "stepped": false }, "baseTexture": "/pa/effects/textures/particles/flat_tail.png", "rampTexture": "/pa/effects/textures/particles/uncompressed/no_ramp.png" }, "sizeX": 0.7, "sizeY": 2.4, "sizeRangeX": 0.1, "sizeRangeY": 0.2, "velocityY": -0.75, "velocityX": { "keys": [ [ 0, 0.08 ], [ 0.083, 0.05 ], [ 0.167, -0.05 ], [ 0.25, -0.08 ], [ 0.33, -0.05 ], [ 0.41, 0.05 ], [ 0.5, 0.08 ], [ 0.583, 0.05 ], [ 0.667, -0.05 ], [ 0.75, -0.08 ], [ 0.83, -0.05 ], [ 0.91, 0.05 ], [ 1, 0.08 ], [ 1.083, 0.05 ], [ 1.167, -0.05 ], [ 1.25, -0.08 ], [ 1.33, -0.05 ], [ 1.41, 0.05 ], [ 1.5, 0.08 ], [ 1.583, 0.05 ], [ 1.667, -0.05 ], [ 1.75, -0.08 ], [ 1.83, -0.05 ], [ 1.91, 0.05 ], [ 2, 0.08 ] ], "stepped": false }, "velocityZ": { "keys": [ [ 0, 0 ], [ 0.042, -0.05 ], [ 0.125, -0.08 ], [ 0.208, -0.05 ], [ 0.292, 0.05 ], [ 0.375, 0.08 ], [ 0.458, 0.05 ], [ 0.542, -0.05 ], [ 0.625, -0.08 ], [ 0.708, -0.05 ], [ 0.792, 0.05 ], [ 0.875, 0.08 ], [ 0.958, 0.05 ], [ 1.042, -0.05 ], [ 1.125, -0.08 ], [ 1.208, -0.05 ], [ 1.292, 0.05 ], [ 1.375, 0.08 ], [ 1.458, 0.05 ], [ 1.542, -0.05 ], [ 1.625, -0.08 ], [ 1.708, -0.05 ], [ 1.792, 0.05 ], [ 1.875, 0.08 ], [ 1.958, 0.05 ], [ 2, 0 ] ], "stepped": false }, "velocityRangeX": 0.02, "velocityRangeZ": 0.02, "velocity": 20, "velocityRange": 0, "emissionRate": 15, "rotationRange": 0, "lifetime": 0.8, "lifetimeRange": 0.2, "emitterLifetime": 2, "maxParticles": 75, "useWorldSpace": true, "endDistance": 600 }, { "spec": { "shape": "pointlight", "red": 0, "green": 1, "blue": 0, "alpha": { "keys": [ [ 0, 0 ], [ 0.25, 0.125 ], [ 0.75, 0.1 ], [ 1, 0 ] ], "stepped": false }, "size": { "keys": [ [ 0, 0.5 ], [ 1, 1 ] ], "stepped": false } }, "velocityY": -0.75, "velocity": 20, "sizeX": 35, "sizeRangeX": 20, "emissionRate": 2, "lifetime": 1, "emitterLifetime": 2, "maxParticles": 15, "useWorldSpace": true }, { "spec": { "shader": "particle_add", "red": 0.25, "green": 1, "blue": 0, "alpha": { "keys": [ [ 0, 0 ], [ 0.5, 0.5 ], [ 1, 0 ] ], "stepped": false }, "cameraPush": 2, "baseTexture": "/pa/effects/textures/particles/softdot.png", "rampTexture": "/pa/effects/textures/particles/uncompressed/no_ramp.png" }, "velocity": 1, "sizeX": 8, "sizeRangeX": 2, "emissionBursts": 1, "lifetime": 0.5, "lifetimeRange": 0.1, "emitterLifetime": 0.25, "killOnDeactivate": true, "maxParticles": 3, "endDistance": 600 } ] }
  11. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    TY

    but dude seriously this is unusable.

    I have an already modified shader. you said you just changed three numbers could you tell me which ones and where. it's impossible to compare because your quote has spaces everywhere.
    Last edited: August 27, 2013
  12. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    You need "emissionRate".

    It's possible to compare, just use formatter:
    http://jsonformatter.curiousconcept.com/
    And then use proper diff tool, it's pretty hard to compare large text files just using eyes. ;)
    Last edited: August 28, 2013
  13. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    thanks

    I did the edit.
    Last edited: August 28, 2013
  14. someonewhoisnobody

    someonewhoisnobody Well-Known Member

    Messages:
    657
    Likes Received:
    361
    Like he said, just use a formating tool like http://jsonlint.com/ its realy not that hard, I just found any value with emission and made its value 1/2. It's a lot easier than using my file, hence why I was reluctant to post it.

Share This Page