Talk:Random AV Particle Name Generator

From Second Life Wiki
Jump to navigation Jump to search

Particle Text Generator v1.0 ~ Help Page

What does it do?

The Particle Text Generator randomly selects an AV from a crowd & then displays their first name as a stream of particles. For example, if "Joe Smith" is selected, the letters "J", "0" and "E" are emitted as particles out of the prim. If no AV's are in the vicinity, the Particle Text Generator will instead emit of stream of text of your choosing. For example, "PARTICLE CRUCIBLE", "NOW OPEN", "SALE ON". It is possible to turn off the AV selection functionality entirely, and simply use the Particle Text Generator to emit your own text.

How does it do it?

Once the text has been determined, the Particle Text Generator maps each letter of the text against a font texture UUID. This UUID is then used as the texture for a particle emission. Each letter of the text constitutes a separate particle emission. Other attempts to do this are avaliable as free scripts in-world. However these have proven to be unstable and unreliable. This has been blamed on the "lag" but, in fact, there is a fundemental code error in these scripts that causes them to be unstable and unreliable, as well as other ineffcient procedures. These flaws are corrected in the version presented here. See section 'Code Improvements' below for further details.

How Do I Set-up the Particle Text Generator?

  1. Simply put the script in a prim and 'Touch'.
  2. Select the 'On' option from the blue dialog menu.

How Do I Set My Own Text?

  1. Open up the script.
  2. Find the line that says: "list DefaultTextPalette = [".....", ".....", ".....", "....."];".
  3. Carefully overwrite the existing text with your own text. Ensure you keep within the speech marks.

How Do I Get the Text to Be Seen From Further Away?

As a rule, the larger the prim, the further away that the text stream will be seen. However, draw distance, particle count settings and PC spec also have a bearing. This makes it difficult to predict how each client viewer will render the particle stream.

How Do I Use My Own Set of Fonts?

  1. Create for yourself or otherwise procure a set of individual textures for the letters [A - Z] and numbers [0 - 9]. 256 x 256 32bit alpha tga's are ideal. See this fabulous thread by Chosen Few if you need to learn more about this: http://forums.secondlife.com/showthread.php?t=80851
  2. Upload these into SL.
  3. Individually right-click each texture and capture it's UUID.
  4. In the script, locate the long list of UUID's (variable MasterUUIDPalette). You will see the the letters [A - Z] and numbers [0 - 9] marked on each line. Carefully paste your UUID over the existing one. Do this for each individual character. Ensure you keep within the speech marks for each character.

How Do I Get the Text to Emit in a Different Direction?

With the prim rotation set at 0, 0, 0 the particles will emit vertically. To have them emit in a different plane, simply rotate the prim.

Menu Options

A description of the buttons on the blue dialog menu:

  • 'On': Starts the Particle Text Generator.
  • 'Off': Stops the Particle Text Generator.
  • 'Defaults': Will only emit text that is contained in variable DefaultTextPalette. It will not scan the area for nearby AV's.
  • 'Names': Scans the vicinity for AV's. Selects one at random and emits their first name as a particle stream. If no AV's are in the vicintiy, then it will emit text contained in variable DefaultTextPalette until an AV re-enters the area.
  • 'SetRange': Allows you to set how far a distance away from the prim that scans for AV's will be performed. This option is only avaliable in Names mode.
  • 'ResetScript': Restores all settings.
  • 'Help': Links to this page from in-world.

Code Improvements

This is not the first time attempt use the XYText technology to create a particle text stream. A number of free scripts are available in-world, although they all seem to stem from the same source. For the most part they are unstable and unreliable. This has been blamed on "lag". Indeed a text particle stream is a delicate operation and it is particularily susceptible to time dilation and client-lag. However, although this is true, the scripts also contain a fundemental llParticleSystem() call flaw which, when corrected, helps counter the effects of time dilation. Additionally, by making other code changes, the effciency of this time-critical operation is significantly improved.

Palette Design