Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Help needed: Exhaust smoke

Sav Mager
Registered User
Join date: 10 Oct 2009
Posts: 3
10-13-2009 04:45
Hi

Anyone know a script for exhaust smoke - tried some other smoke scripts but they all splutter everywhere, rather than a nice plume coming out of a cylinder...

cheers
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
10-13-2009 06:25
Visit the Particle Laboratory and look for the sample particle scripts in their sandbox area. There ought to be something there to get you started. Then it's just a matter of tweaking parameters until you get exactly the effect you want. If you don't yet know what to tweak, spend time while you're at the Lab to work through the tutorials. It's the best way to learn in SL.
_____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask.... ;)

Look for my work in XStreetSL at
Paladin Pinion
The other one of 10
Join date: 3 Aug 2007
Posts: 191
10-13-2009 11:31
There is a "smoke stream" preset in Mote, which needed only a little alteration to push the smoke backward:

llParticleSystem([PSYS_PART_FLAGS, 0| PSYS_PART_EMISSIVE_MASK| PSYS_PART_INTERP_COLOR_MASK| PSYS_PART_INTERP_SCALE_MASK| PSYS_PART_WIND_MASK,
PSYS_SRC_BURST_RATE, 0.05,
PSYS_SRC_BURST_RADIUS, 0.5,
PSYS_SRC_ANGLE_END, 0.01,
PSYS_SRC_OMEGA, <0.0,0.0,0.05>,
PSYS_PART_MAX_AGE, 3.0,
PSYS_SRC_BURST_SPEED_MIN, 0.2,
PSYS_SRC_BURST_SPEED_MAX, 0.3,
PSYS_PART_END_ALPHA, 0.0,
PSYS_PART_START_COLOR, <0.25,0.25,0.25>,
PSYS_PART_END_COLOR, <0.75,0.75,0.75>,
PSYS_PART_START_SCALE, <0.1,0.1,0.1>,
PSYS_PART_END_SCALE, <3.0,2.75,2.0>,
PSYS_SRC_ACCEL, <0.0,0.0,-0.9>,
PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_ANGLE_CONE
]);

If it's too much smoke for your exhaust, increase the burst rate and maybe decrease the part age. You may have to adjust the radius to fit your prim.
_____________________
Mote Particle Script Generator - easier and faster than any HUD
Also: Paladin's Sunbeam. Up at dawn, gone by dusk, day and night sounds, fully configurable
See more at: www.paladinpinion.com
Sav Mager
Registered User
Join date: 10 Oct 2009
Posts: 3
10-14-2009 08:17
thanks, i'll give it a go

I tried adjusting the parameters on other smoke scripts that i found but i couldnt work out how to change the direction (without literally firing it out at a crazy unrealistic speed and distance...there sisnt seem to be much variable i.e. 1 or 2 or 3 rather than 0.1 or 1.3 etc...)?
Paladin Pinion
The other one of 10
Join date: 3 Aug 2007
Posts: 191
10-14-2009 09:06
It's the PSYS_SRC_ACCEL parameter that pushes the particles in a particular direction. Negative values push backward, positive values push forward. The higher the value of the number, the more push. So in this case I put a -0.9 push on the z axis so that particles would go toward the "back" of the z axis (away from the arrowhead.) You can play with the value, if you want a different acceleration amount. The closer to zero, the less "push". If your exhaust pipe faces the other way, so that acceleration should come out the arrowhead side of the axis, make the number positive.
_____________________
Mote Particle Script Generator - easier and faster than any HUD
Also: Paladin's Sunbeam. Up at dawn, gone by dusk, day and night sounds, fully configurable
See more at: www.paladinpinion.com
Sav Mager
Registered User
Join date: 10 Oct 2009
Posts: 3
10-15-2009 14:43
Im Getting A Syntax Error On The First Line, Right Near The Start Where The Open Bracket Is?

Stuck In Caps - Sorry
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
10-15-2009 15:27
It compiles fine for me ... no errors. Puts out a nice gentle exhaust plume too. Here's my test script using Paladin's parameters...

CODE

integer ON = TRUE;
default
{
state_entry()
{
llParticleSystem([PSYS_PART_FLAGS, 0| PSYS_PART_EMISSIVE_MASK| PSYS_PART_INTERP_COLOR_MASK| PSYS_PART_INTERP_SCALE_MASK| PSYS_PART_WIND_MASK,
PSYS_SRC_BURST_RATE, 0.05,
PSYS_SRC_BURST_RADIUS, 0.5,
PSYS_SRC_ANGLE_END, 0.01,
PSYS_SRC_OMEGA, <0.0,0.0,0.05>,
PSYS_PART_MAX_AGE, 3.0,
PSYS_SRC_BURST_SPEED_MIN, 0.2,
PSYS_SRC_BURST_SPEED_MAX, 0.3,
PSYS_PART_END_ALPHA, 0.0,
PSYS_PART_START_COLOR, <0.25,0.25,0.25>,
PSYS_PART_END_COLOR, <0.75,0.75,0.75>,
PSYS_PART_START_SCALE, <0.1,0.1,0.1>,
PSYS_PART_END_SCALE, <3.0,2.75,2.0>,
PSYS_SRC_ACCEL, <0.0,0.0,-0.9>,
PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_ANGLE_CONE
]);
}
touch_start(integer total_number)
{
if(ON){
llParticleSystem([]);
}
else {
llResetScript();
}
ON = !ON;
}
}
_____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask.... ;)

Look for my work in XStreetSL at