Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
|
01-01-2006 12:47
While developing my Clockwork Blunderbuss today, I felt the need to incorporate a muzzle flash. "Particles," thought I, "the obvious solution" only the things just won't appear reliably.
I have an invisible prim just at the end of the muzzle which, when link_messaged, should generate a muzzle flash and afterwards some smoke. Sometimes this works. Sometimes it doesn't. I've tried generating one big particle with PSYS_SRC_PATTERN_DROP, which doesn't appear 90% of the time - I've tried lots of little ones with PSYS_SRC_PATTERN_ANGLE_CONE, which is slightly more reliable but again doesn't appear all the time.
There are a lot of particles flying around when I'm testing the gun but even when I'm testing the flash on its own (still part of the gun linkset but activated by touch) it still doesn't happen all the time - though it's slightly better.
I even tried rezzing a muzzle flash object but that didn't work very well. I suppose that I could have a transparent muzzle flash object attached to the muzzle which briefly went visible when receiving a fire message, but that seems a little unwieldy and wouldn't look very good in any case.
Can anyone help here?
(On the other hand, I am quite pleased with the key effect. Pity nobody will ever notice it unless I point it out.)
N.B. My Max Particle Count is set to 4096 and there's no way that many particles around, so it's not that.
|
Aliasi Stonebender
Return of Catbread
Join date: 30 Jan 2005
Posts: 1,858
|
01-01-2006 12:58
From: Ordinal Malaprop Can anyone help here?
(On the other hand, I am quite pleased with the key effect. Pity nobody will ever notice it unless I point it out.)
N.B. My Max Particle Count is set to 4096 and there's no way that many particles around, so it's not that.
You'd be surprised. Try testing your gun either very high up, or in a very quiet sim - but particles will do a muzzle flash just fine; Gerami Fizz has a series of reproduction antique revolvers with such.
_____________________
Red Mary says, softly, “How a man grows aggressive when his enemy displays propriety. He thinks: I will use this good behavior to enforce my advantage over her. Is it any wonder people hold good behavior in such disregard?” Anything Surplus Home to the "Nuke the Crap Out of..." series of games and other stuff
|
Nepenthes Ixchel
Broadly Offended.
Join date: 6 Dec 2005
Posts: 696
|
01-01-2006 13:38
From: Ordinal Malaprop
N.B. My Max Particle Count is set to 4096 and there's no way that many particles around, so it's not that.
I've found particle generators can act un-reliably in some sims; I was using particle wings, and sometimes they would appear patchy or only some generators would fire until I switched sims, even though I was 600 metres up on my own.
|
Jopsy Pendragon
Perpetual Outsider
Join date: 15 Jan 2004
Posts: 1,906
|
01-12-2006 19:47
Ordinal- Maybe try a combination effect? An alpha'd out prim with your 'flash' texture that blinks into visibility for a moment, as well as some particles? (I'd even recommend animating the 'flash' texture to scroll out/away from the muzzle so that when it is visible it dosn't look like a frozen image, might even look cool on a hollowed out cone). For the particle component, I'd stick with the angle_cone effect maybe something like: llParticleSystem( [ PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_ANGLE, PSYS_SRC_ANGLE_BEGIN, 0.7, PSYS_SRC_BURST_COUNT, 30, PSYS_SRC_BURST_RATE, 0.01, PSYS_PART_MAX_LIFE, 0.9, PSYS_SRC_MAX_LIFE, 0.9, PSYS_PART_START_SCALE, <0,0,0>, PSYS_PART_END_SCALE, <2,2,0>, PSYS_PART_END_ALPHA, 0.1, PSYS_PART_ACCEL, <0,0,1>, PSYS_SRC_FLAGS, ( PSYS_PART_EMISSIVE_MASK | PSYS_PART_INTERP_SCALE_MASK | PSYS_PART_INTERP_COLOR_MASK | PSYS_PART_WIND_MASK | PSYS_PART_FOLLOW_VELOCITY_MASK ) ] ); // disclaimer: This code snippet was dashed out from memory and probably has some trivial errors. You could stick with the drop pattern... and try increasing the burst count to 10 or so... you're much more likely to get a particle if you do that... but the edges of your particle texture may get kinda 'crispy' looking. Good luck to you! 
_____________________
* The Particle Laboratory * - One of SecondLife's Oldest Learning Resources. Free particle, control and targetting scripts. Numerous in-depth visual demonstrations, and multiple sandbox areas. - Stop by and try out Jopsy's new "Porgan 1800" an advanced steampunk styled 'particle organ' and the new particle texture store!
|
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
|
01-12-2006 20:31
Particles are unreliable with lag or low FPS. You won't get nice, even distributions or reliability. Also, the server has to send more data to a client to notify them of a new particle system than to tell them that a prim has a different alpha value.
|