Game Development Reference
In-Depth Information
or engines are used in the gaming industry to create the various effects of ire, rain, snow, smoke, fog, gun
muzzle lares, explosions, dust clouds, and so on [1].
7.6.2
p arTiCle s ysTem B asiCs in s eCond l ife and o pen s im
In Second Life and OpenSim, particles can be generated from any sort of mesh object or prim that contains
an LSL-based particle script. Refer to Table  7.2, which shows the text of a basic particle script from the
Particle Lab in Second Life, to see how these qualities are delineated in the code. In the LSL code, PSYS
means Particle System, and SRC means Source or the particle emitter prim or mesh object.
Read through the LSL code and then double back to look at it while comparing the various modiiers in
the script from the modiiers list below Table 7.2.
There are many qualities to a particle that can be affected with a script, and they can be divided into the
following groups: physical attributes, temporal attributes, and movement attributes.
Refer to the list that follows and the lines of the LSL particle script from Table 7.2 once you have put it into
an empty script inworld to see how this simple script provides lots of ways to affect how the particle looks
and behaves. This script should create a basic particle effect that starts as cyan streaks, which gradually turn
into circular dots that bounce away as they are affected by the wind. Please note, the LSL scripts in this topic
should be downloaded from the website, http://www.anncudworthprojects.com/, and copied from its text iles
to be pasted into a new script. Please see Chapter 2, section 2.3 for more details on downloading scripts.
7.6.3
l isT of m odifiers in a p arTiCle s CripT
1. Important physical attributes and the LSL basic particle script:
a. Text ure . Line 7: This is a texture image that the system is using from your inventory. The LSL
script will use the default particle set in your basic inventory if you have not added the texture
to the content inventory of the prim that holds this script.
b.
Scale or size . Line 8: This is measured in x and y directions only, in meters; the maximum is 4.0
meters.
c.
Color . Line 9: Colors in percentage of R, G, and B.
d.
Alpha or level of transparency . Line 10: 1.0 = totally opaque, 0.0 = totally transparent.
e.
Emissive quality. Line 30: The // was removed in this line to make these particles self-illuminating.
f.
Burst count . Line 12: Sets how many particles come out on each timed burst.
g.
Burst radius . Line 19: Distance from emitter the particles originate, 0.0 = center.
h.
Bounce . Line 33: Flagged on/off; works sort of like a force ield located at the center of the
emitter to relect and redirect the movement of the particles back in the opposite direction. The
particles will bounce up and then fall down to hit it again, each time with a little less rebound.
2. Important temporal attributes and the LSL particle scripting code line:
a. Life span of particle . Line 14: Determines how long a particle will be shown in the client viewer
once it comes into the avatar's view or its emitter has been rezzed inworld. The maximum is
60 seconds.
b.
Burst rate . Line 13: Sets how often per second the emitter will create a burst of particles.
3. Important movement attributes and the LSL particle scripting code line:
a. Pattern . Line 17: Basic starting conigurations for low.
b.
Burst speed . Line 18: Speed of particle through its lifetime.
c.
Angle . Line 21: Sets the width of the angle; with pattern 8, will make a 3D cone.
Search WWH ::




Custom Search