Jump to content
Sunbleached

Glitch Particle Effect Script

Recommended Posts

Hello! I want to try to create a particle system script with a glitch effect that appears and distorts colors behind it. I saw it several times inworld, and on the market. Does anyone know how this works and how to do it?

Share this post


Link to post
Share on other sites

Sounds like you'd want to look at the blending parameters. The wiki page has a section on it. And I believe the Particle Laboratory inworld might also have some demos or visual explanations you could study.

  • Thanks 1

Share this post


Link to post
Share on other sites
1 hour ago, Wulfie Reanimator said:

I can post an effect here later that inverts the colors behind the particle.

Hello! Thanks very much! It would be just awesome!

Share this post


Link to post
Share on other sites
default
{
    state_entry()
    {
        llParticleSystem([
            PSYS_PART_FLAGS,( 0 
                |PSYS_PART_FOLLOW_SRC_MASK
                |PSYS_PART_EMISSIVE_MASK
                |PSYS_PART_RIBBON_MASK ), 
            PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_DROP ,
            PSYS_PART_START_ALPHA,0,
            PSYS_PART_END_ALPHA,0,
            PSYS_PART_START_COLOR,<1,1,1> ,
            PSYS_PART_END_COLOR,<1,1,1> ,
            PSYS_PART_BLEND_FUNC_SOURCE,4,
            PSYS_PART_BLEND_FUNC_DEST,5,
            PSYS_PART_START_GLOW,1,
            PSYS_PART_END_GLOW,1,
            PSYS_PART_START_SCALE,<4,4,0>,
            PSYS_PART_END_SCALE,<1,1,0>,
            PSYS_PART_MAX_AGE,5,
            PSYS_SRC_MAX_AGE,0,
            PSYS_SRC_ACCEL,<0,0,1>,
            PSYS_SRC_BURST_PART_COUNT,5,
            PSYS_SRC_BURST_RADIUS,0,
            PSYS_SRC_BURST_RATE,0.296875,
            PSYS_SRC_BURST_SPEED_MIN,0.5,
            PSYS_SRC_BURST_SPEED_MAX,0.5,
            PSYS_SRC_ANGLE_BEGIN,0,
            PSYS_SRC_ANGLE_END,0,
            PSYS_SRC_OMEGA,<0,0,0>,
            PSYS_SRC_TEXTURE, (key)"8dcd4a48-2d37-4909-9f78-f7a9eb4ef903",
            PSYS_SRC_TARGET_KEY, (key)"00000000-0000-0000-0000-000000000000"
         ]);
    }
}

Here you go,  just plop this in a prim.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
1 hour ago, Whirly Fizzle said:

Here you go,  just plop this in a prim.

Thank you so much! Its very similar. So what part of the script does all the magic? I mean reverses color behind the particles.

Share this post


Link to post
Share on other sites
43 minutes ago, Sunbleached said:

Thank you so much! Its very similar. So what part of the script does all the magic? I mean reverses color behind the particles.

These lines, specifically. I added the constant name as a comment. They're listed in the particle system wiki page.

PSYS_PART_BLEND_FUNC_SOURCE, 4,  // PSYS_PART_BF_ONE_MINUS_DEST_COLOR
                                 // "Scale the RGBA values by the inverted RGBA values of the destination"

PSYS_PART_BLEND_FUNC_DEST, 5,    // PSYS_PART_BF_ONE_MINUS_SOURCE_COLOR
                                 // "Scale the RGBA values by the inverted RGBA values of the particle source."

 

  • Like 3
  • Thanks 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...