Particle customization patch

Particle customization patch

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
quantum
Posts: 590
Joined: 19 Sep 2006, 22:48

Particle customization patch

Post by quantum »

It's already committed by Trepan, you just need the SVN build to use this stuff.


New plasma tdf Tags

int stages (default:5) - number of particles used in one plasma shot.
float sizeDecay (default:0) - how much a plasma particle is smaller than the previous within the same plasma shot.
float alphaDecay (default:1) - how much a plasma particle is more transparent than the previous.
float separation (default:1) - distance between each plasma particle.
bool noGap (default:1) - if set to 1, the distance between plasma particles is proportional to the size of the two particles. If set to 0, the distance between plasma particles will be proportional to the size of the first particle.

Example

Code: Select all

[GUN]
{
    name                    = plasmaCannon;
    rendertype              = 4;
    lineofsight             = 1;
    turret                  = 1;
    range                   = 180;
    reloadtime              = 0.31;
    weapontimer             = 0.1;
    weaponvelocity          = 500;
    sprayangle              = 1180;
    areaofeffect            = 8;
    burst                   = 3;
    burstrate               = 0.1;
    size                    = 1.75;
    rgbcolor                = 1 0.95 0.4;
    intensity               = 0.7;
    soundstart              = flashemg;
    tolerance               = 5000;
    startsmoke              = 0;
    endsmoke                = 0;
    //new stuff
    sizeDecay               = 1;
    alphadecay              = 0.9;
    separation              = 1.1;
    stages                  = 10;
    noGap                   = 0;

    [DAMAGE]
    {
        default                =12;
    }
}
Screenshots

Results if you change the following tags, all other conditions being equal:
alphaDecay
separation
stages
sizeDecay

Two plasma shots that are the same, except for:

noGap = 1
noGap = 0







New particle texture customization options


Code: Select all

sbtrailtexture         - default first section of starburst missile trail texture
missiletrailtexture    - default first section of missile trail texture
muzzleflametexture     - default muzzle flame texture
repulsetexture         - texture of impact on repulsor
dguntexture            - dgun texture
flareprojectiletexture - texture used by flares that trick missiles
sbflaretexture         - default first section of starburst missile trail texture
missileflaretexture    - default first section of missile trail texture
beamlaserflaretexture  - default beam laser flare texture
bubbletexture          - torpedo trail texture
gfxtexture             - nanospray texture
projectiletexture      - appears to be unused
repulsegfxtexture      - used by repulsor
sphereparttexture      - sphere explosion texture
wrecktexture           - smoking explosion part texture
plasmatexture          - default plasma texture
Those textures go in gamedata/resources.tdf. Here is an example:

Code: Select all

[projectiletextures]
{
    circularthingy          = circularthingy.tga;
    laserend                =  laserend.tga;
    laserfalloff            = laserfalloff.tga;
    randdots                = randdots.tga;
    smoketrail              = smoketrail.tga;
    wake                    = wake.tga;
    flare                   = flare.tga;
    explo                   = explo.tga;
    explofade               = explofade.tga;
    heatcloud               = explo.tga;
    flame                   = flame.tga;
    flare                   = flare.tga;

    //optional
    fireballflaretexture    = 1a.tga;
    flareprojectiletexture  = 2a.tga;
    missiletrailtexture     = 3a.tga;
    muzzleflametexture      = 4a.tga;
    repulsetexture          = 5a.tga;
    sbflaretexture          = 6a.tga;
    missileflaretexture     = 7a.tga;
    beamlaserflaretexture   = 8a.tga;
    sbtrailtexture          = 9a.tga;
    bubbletexture           = 1.tga;       
    gfxtexture              = 3.tga;
    projectiletexture       = 4.tga;
    repulsegfxtexture       = 5.tga;
    sphereparttexture       = 6.tga;
    wrecktexture            = 8.tga;
    dguntexture        = 9.tga;
}

Thanks to Trepan for all his help!
Last edited by quantum on 05 May 2007, 02:27, edited 2 times in total.
User avatar
Machiosabre
Posts: 1474
Joined: 25 Dec 2005, 22:56

Post by Machiosabre »

<3 quantum
User avatar
Zpock
Posts: 1218
Joined: 16 Sep 2004, 23:20

Post by Zpock »

PICCIES!!!!
User avatar
quantum
Posts: 590
Joined: 19 Sep 2006, 22:48

Post by quantum »

They are in the "Screenshots" part :P
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

Sounds really good.
[KnoX]ElementalGizmo
XTA Developer
Posts: 266
Joined: 24 Aug 2006, 01:33

Post by [KnoX]ElementalGizmo »

An explanation with example code, pictures and written code. Why cant the damn wiki be this good?

Thanks for sharing this!
User avatar
Zpock
Posts: 1218
Joined: 16 Sep 2004, 23:20

Post by Zpock »

What about a way to control some how the particles move? Like make them go in random directions, or twirling motion..
[KnoX]ElementalGizmo
XTA Developer
Posts: 266
Joined: 24 Aug 2006, 01:33

Post by [KnoX]ElementalGizmo »

sphereparttexture - sphere explosion texture

OMG NO WAY!

does this mean we will be able to texture shields soon as well!?!??!?!
[KnoX]ElementalGizmo
XTA Developer
Posts: 266
Joined: 24 Aug 2006, 01:33

Post by [KnoX]ElementalGizmo »

I know this is completely of topic but is there a thread or something discussing your work with the particle rotate on axis code? The XTA V9Alpha is really needing something to make it as good as the new Annihilator FX.

Ill edit this out if need be, just really wanna know!lol
User avatar
quantum
Posts: 590
Joined: 19 Sep 2006, 22:48

Post by quantum »

[KnoX]ElementalGizmo wrote: does this mean we will be able to texture shields soon as well!?!??!?!
No, that's the expanding sphere custom explosion. And I haven't managed yet to make a usable texture for it :(
Zpock wrote: What about a way to control some how the particles move? Like make them go in random directions, or twirling motion..
You mean in plasma shots? Adding some randomness shouldn't be hard. I don't know if I can manage to make them twirl, though.

[KnoX]ElementalGizmo wrote: your work with the particle rotate on axis code
Basically, my "work" consisted in:

1) look at the particle code
2) boggle at it.

But I haven't given up!
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

I think all of this would be made horribly obsolete by a patch that allowed you to define a particle sfx as a projectile.
User avatar
REVENGE
Posts: 2382
Joined: 24 Aug 2006, 06:13

Post by REVENGE »

AF wrote:I think all of this would be made horribly obsolete by a patch that allowed you to define a particle sfx as a projectile.
Hmm...And why hasn't that been done yet?
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

Because the number of remaining developers who have enough time for this is rather low and they work on things of higher priority.

It's not that I don't like this, would be great indeed.
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

Yes.. We need projectiliar weapons to have particle trails... Mmmm, delicious. :lol:
User avatar
Noruas
XTA Developer
Posts: 1269
Joined: 24 Feb 2005, 02:58

Post by Noruas »

Is it possible to make the plasma at a certain time of flight separate? Like it fires one large plasma blob straight up, and 200 blobs fall down, all with default damage divided by 200.
edit: wait, this is a request.


Good Job Quantum, I Wuve It
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: Particle customization patch

Post by zwzsg »

Those textures go in gamedata/resources.tdf.
What if we want different textures for each missiles? Sounds pretty limiting to me that ALL laser must use the same textures, ALL missile trails the same texture, ALL weapons the same flare, etc...

I wish you'd move some into the weapon's TDF.
User avatar
quantum
Posts: 590
Joined: 19 Sep 2006, 22:48

Post by quantum »

The "texture1" TDF tag designates the flare, and "texture2" designates the first section of the trail.

There is no way to set the texture of the rest of the trail for individual weapons, but I can try to make it possible, in my next patch.
Post Reply

Return to “Engine”