|
Abraxes Binder
Registered User
Join date: 23 May 2008
Posts: 205
|
06-16-2008 06:05
Particle fade problem Hi, I want the texture (a picture) of particle to fade to alpha0, but they do not fade. In the wiki there is a strange sentence: PSYS_PART_START_ALPHA: alpha of starting particle (This parameter isn't working correctly. Acts as 1 if set to value higher than 0) i interpitate this as 'only 1 or 0 works'?? ..But there is no alpha fade at all :/ Can anyone show a simple particle system that actually DO fade textures to transparent? tyia.
_____________________
BR ab
|
|
revochen Mayne
...says
Join date: 14 Nov 2006
Posts: 198
|
06-16-2008 07:12
Dont know why your particles are screwing up. Just tested this script and it works fine // Particle System 1.0
StartSteam() { // MASK FLAGS: set to "TRUE" to enable integer glow = TRUE; // Makes the particles glow integer bounce = FALSE; // Make particles bounce on Z plane of objects integer interpColor = TRUE; // Color - from start value to end value integer interpSize = TRUE; // Size - from start value to end value integer wind = FALSE; // Particles effected by wind integer followSource = FALSE; // Particles follow the source integer followVel = TRUE; // Particles turn to velocity direction
// Choose a pattern from the following: // PSYS_SRC_PATTERN_EXPLODE // PSYS_SRC_PATTERN_DROP // PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY // PSYS_SRC_PATTERN_ANGLE_CONE // PSYS_SRC_PATTERN_ANGLE integer pattern = PSYS_SRC_PATTERN_ANGLE; // PSYS_SRC_PATTERN_EXPLODE;
// Select a target for particles to go towards // "" for no target, "owner" will follow object owner // and "self" will target this object // or put the key of an object for particles to go to key target = "";
// PARTICLE PARAMETERS float age = 4.4; // Life of each particle float maxSpeed = 1; // Max speed each particle is spit out at float minSpeed = 0; // Min speed each particle is spit out at //string texture="water"; string texture = "Particle Arrow"; // Texture used for particles, default used if blank float startAlpha = 1; // Start alpha (transparency) value float endAlpha = 0; // End alpha (transparency) value vector startColor = <1,1,1>; // Start color of particles <R,G,B> vector endColor = <1,1,1>; // End color of particles <R,G,B> (if interpColor == TRUE) vector startSize = <5,5,.1>; // Start size of particles vector endSize = <10,10,.1>; // End size of particles (if interpSize == TRUE) vector push = <0,0,0>; // Force pushed on particles
// SYSTEM PARAMETERS float rate = 0.5; // How fast (rate) to emit particles float radius = 3; // Radius to emit particles for BURST pattern integer count = 1; // How many particles to emit per BURST float outerAngle = PI; // Outer angle for all ANGLE patterns PI/4 float innerAngle = 0.5; // Inner angle for all ANGLE patterns vector omega = <0,0,0>; // Rotation of ANGLE patterns around the source float life = 0; // Life in seconds for the system to make particles
// SCRIPT VARIABLES integer flags;
flags = 0; if (glow) flags = flags | PSYS_PART_EMISSIVE_MASK; if (bounce) flags = flags | PSYS_PART_BOUNCE_MASK; if (interpColor) flags = flags | PSYS_PART_INTERP_COLOR_MASK; if (interpSize) flags = flags | PSYS_PART_INTERP_SCALE_MASK; if (wind) flags = flags | PSYS_PART_WIND_MASK; if (followSource) flags = flags | PSYS_PART_FOLLOW_SRC_MASK; if (followVel) flags = flags | PSYS_PART_FOLLOW_VELOCITY_MASK; if (target != "") flags = flags | PSYS_PART_TARGET_POS_MASK;
llParticleSystem([ PSYS_PART_MAX_AGE,age, PSYS_PART_FLAGS,flags, PSYS_PART_START_COLOR, startColor, PSYS_PART_END_COLOR, endColor, PSYS_PART_START_SCALE,startSize, PSYS_PART_END_SCALE,endSize, PSYS_SRC_PATTERN, pattern, PSYS_SRC_BURST_RATE,rate, PSYS_SRC_ACCEL, push, PSYS_SRC_BURST_PART_COUNT,count, PSYS_SRC_BURST_RADIUS,radius, PSYS_SRC_BURST_SPEED_MIN,minSpeed, PSYS_SRC_BURST_SPEED_MAX,maxSpeed, PSYS_SRC_TARGET_KEY,target, PSYS_SRC_INNERANGLE,innerAngle, PSYS_SRC_OUTERANGLE,outerAngle, PSYS_SRC_OMEGA, omega, PSYS_SRC_MAX_AGE, life, PSYS_SRC_TEXTURE, texture, PSYS_PART_START_ALPHA, startAlpha, PSYS_PART_END_ALPHA, endAlpha ]); }
default { state_entry() { StartSteam(); } }
|
|
Imnotgoing Sideways
Can't outlaw cute! =^-^=
Join date: 17 Nov 2007
Posts: 4,694
|
06-16-2008 07:26
PSYS_PART_START_ALPHA and PSYS_PART_END_ALPHA take float values that can by anywhere from 0.0 to 1.0. With the lowest value being no transparency to the highest being 100% full transparency. The most reasonable increment is 0.01 but I think that increments of 0.001 are possible. (^_^) To get information on Float look here >> http://wiki.secondlife.com/wiki/Float << (^_^) If you're after a particle that goes from fully visible and fades to fully invisible you want to set PSYS_PART_START_ALPHA to 0.0 and PSYS_PART_END_ALPHA to 1.0. In fact, I just made myself a cute "LAWL" poofer using those exact settings this past week. (^_^)y
|
|
Abraxes Binder
Registered User
Join date: 23 May 2008
Posts: 205
|
Thanks
06-16-2008 08:29
I have given up trying to find out why my pSyst screws up :/ I cant see -any- difference , but they must be different couse yours fade, mine doesent ... so w e i r d Thank you. BR ab
_____________________
BR ab
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
06-16-2008 12:27
A changing alpha requires the PSYS_PART_INTERP_COLOR_MASK flag. Do you have that turned on?
|
|
Abraxes Binder
Registered User
Join date: 23 May 2008
Posts: 205
|
ayy..
06-17-2008 01:39
gee Hewee, that is missing from the wiki. for PSYS_PART_START_COLOR the mask is listed as prerequested, but for PSYS_PART_START_ALPHA there is no mask listed at all -only that weird "(This parameter isn't working correctly. Acts as 1 if set to value higher than 0)" sentence- Now, i deleted my own faulty mehh so i cant check if it indeed was the missing mask, but im sure it was :/ Thanks for the info Hewee! It will definately come in play some day ;)
_____________________
BR ab
|