Jump to content

How can I change the density of particles?


Suki Hirano
 Share

You are about to reply to a thread that has been inactive for 4452 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I'm using the lockguard v2 script. I was wondering how I can change the density of the particle chain so that there's no large gaps? This is what I mean:

loose chain.png

As you can see the bottom is quite fine, the particles are close together, but at the top it's very loose and separated. My particle count in graphics is set to max so I don't think it has anything to do with that.

These are the variables I see in the lockguard script:

    key             kTextureDefault = "480d4a0f-d5be-96fd-e5d4-a43e239ea74b";
    float           fSizeXDefault = 0.05;
    float           fSizeYDefault = 0.05;
    float           fLifeDefault = 3.5;
    float           fGravityDefault = 0.3;
    float           fMinSpeedDefault = 0.005; // Not really used, life generally determines speed.
    float           fMaxSpeedDefault = 0.005; // Not really used, life generally determines speed.
    float           fRedDefault = 1;
    float           fGreenDefault = 1;
    float           fBlueDefault = 1;

 I tried changing "fLifeDefault", but that only makes the chain longer (and thus bent when the distance is not long enough), but does not increase particle density.

Another related question is from this wiki page: http://lslwiki.net/lslwiki/wakka.php?wakka=exchangeLockGuardSource

It says on that page: "Note: if your LockGuard anchor is to be used on an attachement (cuffs, collars, belts, etc), then it is better to add PSYS_PART_FOLLOW_SRC_MASK to nBitField in llLockGuardLink(): this will prevent the particles to trail behind the avatar when the latter moves..."

I'm guessing this is the section of the code it's referring to:

llLockGuardLink( integer fn_nRelinking )
{
    
    //
    // The simple secret of a particle chain revealed! :)
    //
    
    integer nBitField = PSYS_PART_TARGET_POS_MASK|PSYS_PART_FOLLOW_VELOCITY_MASK;

    llParticleSystem( [] );
                        
    if( fn_nRelinking == FALSE )
        kTarget = llList2Key( lCommandLine, ++nParserCount );
    
    if( fGravity == 0 )
        nBitField = nBitField|PSYS_PART_TARGET_LINEAR_MASK;

 Do I replace everything after nBitField (PSYS_PART_TARGET_POS_MASK|PSYS_PART_FOLLOW_VELOCITY_MASK), or add PSYS_PART_FOLLOW_SRC_MASK to the end of the list?

Thanks for your help.

 

Link to comment
Share on other sites

The variable PSYS_SRC_BURST_PART_COUNT controls the number of particles generated in each burst, and the variable PSYS_SRC_BURST_RATE determines the length of time betweeen bursts. Increasing the particle density, therefore, involves creating more particles in bursts that are more closely spaced in time.  There's a limit, of course, because each person will only be able to see up to the maximum number of particles set in his/her Preferences (default is usually 4096).

nBitField is a bit mask, so all you are doing is OR-ing whatever separate masks you want to apply to create a composite.  To add PSYS_PART_FOLLOW_SRC_MASK, therefore, you write

integer nBitField = PSYS_PART_TARGET_POS_MASK|PSYS_PART_FOLLOW_VELOCITY_MASK|PSYS_PART_FOLLOW_SRC_MASK;
Link to comment
Share on other sites

As an alternative to generating more particles to try and close the gaps you can also try increasing the size of each particle thereby reducing the number you need to make a complete chain.  Unfortunately particle systems have been prone to the "sputter" effect for some time now, so to some extent you're probably just going to have to live with it in busy/built-up areas.

 

 

Link to comment
Share on other sites

Thanks rolig.

Oddly changing the # per burst doesn't affect it that much, still the huge gaps. The rate of burst is already at 0, which I'm assuming is the fastest.

It's not really the sim either, since I went to a completely empty sandbox and it still displays the huge gaps. I'm not wearing anything else that generates particles either. So I'm guessing it's just one of those SL bugs... these particle chains do look awesome in outfit ads though, so I'm to conclude they're photoshopped...

Link to comment
Share on other sites

Could be, or maybe it's just your own computer.  Particles are generated client-side, so each user will potentially see a different version of what you designed.  It all depends on what your graphics card feels it can handle. 

You might also try applying an acceleration to the particles too.  See if that helps.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4452 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...