Mivux Posted June 11 Share Posted June 11 (edited) So i have a script here for sprite image emitter, i am trying to create a particle script that displays a texture so that the image shows the same to an avatar from all sides. i was using this script: default{ state_entry() { llParticleSystem([ PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_DROP, PSYS_SRC_TEXTURE, "UUID of texture" ]); }} But the image on my side that i put for UUID is extremely large and it wont shrink.. do i need a separate script to make that smaller? And another thing, when i move the object around it makes the image spam around as it follows before disappearing, is there a way to keep all the particles in one bubble? I have attempted to shrink the image that didn't work so i am assuming its a script? ♥ https://gyazo.com/4f955425f6ff54c5370f7f714757936e Edited June 11 by Mivux Link to comment Share on other sites More sharing options...
Qie Niangao Posted June 11 Share Posted June 11 You'll want to consult the wiki article on llParticleSystem(). You're missing a _SCALE parameter to set the size of the emitted particle, and the _FOLLOW_SRC_MASK flag to make it stick with the object as it moves. Something like: default { state_entry() { llParticleSystem([ PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_DROP, PSYS_SRC_TEXTURE, "bca29a42-c2f3-bf92-c614-ed91654c7bf7", PSYS_PART_FLAGS, PSYS_PART_FOLLOW_SRC_MASK | PSYS_PART_EMISSIVE_MASK, PSYS_PART_START_SCALE, <0.5, 0.5, 0> ]); } } To show these flags are just a bitfield, combined with the "|" bitwise-or operator, I threw in another one, _EMISSIVE_MASK to make it look full bright, on a hunch you might want that, too. 1 1 Link to comment Share on other sites More sharing options...
Frionil Fang Posted June 11 Share Posted June 11 If you wanted to be "nicer", you should also consider changing the PSYS_PART_MAX_AGE (particle lifetime) and PSYS_SRC_BURST_RATE (particle generation delay) parameters: the defaults are 10 and 0.1, resulting in the system spamming a new particle 10 times a second, building up to 100 particles on top of each other. 100 isn't terrible, but particles can be surprising frame-rate killers if their amount and screen coverage go high since they require rendering transparent textures, and for a simple sprite floaty thing you could get away with much fewer particles without glitching so I'd advise always using as few as possible to achieve a decent look. To adjust @Qie Niangao's script for above, you'd do: default { state_entry() { llParticleSystem([ PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_DROP, PSYS_SRC_TEXTURE, "bca29a42-c2f3-bf92-c614-ed91654c7bf7", PSYS_PART_FLAGS, PSYS_PART_FOLLOW_SRC_MASK | PSYS_PART_EMISSIVE_MASK, PSYS_PART_START_SCALE, <0.5, 0.5, 0>, PSYS_PART_MAX_AGE, 1, PSYS_SRC_BURST_RATE, 0.1 ]); } } to set the lifetime to only 1 second and thus only 1/10th the particles on screen, without obvious loss of quality. However, it will depend on the texture which settings look good enough, experimentation is useful. Blended edges get stacked the more particles there are; on the other hand the faster the particles die out and the fewer there are, the more likely it is to flicker. Setting age and burst rate both to the same number to have only 1 particle on screen is more or less guaranteed to flicker, since the effect's internal timing is never exact enough. 1 1 Link to comment Share on other sites More sharing options...
Quistess Alpha Posted June 11 Share Posted June 11 1 hour ago, Frionil Fang said: set the lifetime to only 1 second I'd go the other direction and push the lifetime to 30.0 seconds (the maximum), and the burst rate to 29.9 seconds, but that 1/10th of a second of overlap looks best when using a particle texture that doesn't prominently feature partial transparency (I.E. most pixels are either 100% or )% transparent). 1 Link to comment Share on other sites More sharing options...
Frionil Fang Posted June 11 Share Posted June 11 (edited) 44 minutes ago, Quistess Alpha said: I'd go the other direction and push the lifetime to 30.0 seconds (the maximum), and the burst rate to 29.9 seconds, but that 1/10th of a second of overlap looks best when using a particle texture that doesn't prominently feature partial transparency (I.E. most pixels are either 100% or )% transparent). Yeah, don't think there's a clear cut best solution, I usually go with the short life/quicker rate mostly so the particles don't end up sticking around after the object is detached or removed (I tend to use them as temporary effects). Edit: can be especially annoying with a particle that's set to follow source: they no longer have a source to follow, so they hover where the object was instead of doing a graceful exit or following the avatar etc. Edited June 11 by Frionil Fang 1 Link to comment Share on other sites More sharing options...
PheebyKatz Posted June 14 Share Posted June 14 (edited) On 6/11/2024 at 1:45 PM, Quistess Alpha said: I'd go the other direction and push the lifetime to 30.0 seconds (the maximum), and the burst rate to 29.9 seconds, but that 1/10th of a second of overlap looks best when using a particle texture that doesn't prominently feature partial transparency (I.E. most pixels are either 100% or )% transparent). I go this route myself, so seconding it. It's how people make those "1-prim statues" that always face the camera. I once rode a giant owl whose head was rendered this way. It was pretty well-done. Also, having the particle's lifetime set high is how you do things like leaving a trail of flowers behind yourself, etc. When I was new, I thought it was some kind of magic. I guess it kinda is. Edited June 14 by PheebyKatz Link to comment Share on other sites More sharing options...
Xiija Posted June 14 Share Posted June 14 (edited) here is what i use for a texture "hologram" , changing the PSYS_PART_MAX_AGE from 0.2 to lower values like 0.1, or 0.05 will get rid of the trails when moving the texture, but will cause the texture to flcker. You can adjust the size either with the variable, or manually ( start & end scale ). string Texture = "a1d0440d-6276-c659-cb56-ae62a162f626"; float Size = 1.00; float Height; show() { llParticleSystem([ PSYS_PART_FLAGS, 0|PSYS_PART_EMISSIVE_MASK , PSYS_SRC_PATTERN, 4, PSYS_PART_START_GLOW, 0.002, PSYS_PART_END_GLOW, 0.002, PSYS_PART_START_ALPHA, 1.0, PSYS_PART_END_ALPHA, 1.0, PSYS_PART_START_COLOR, <1.0,1.0,1.0>, PSYS_PART_END_COLOR, <1.0,1.0,1.0>, PSYS_PART_START_SCALE, < Size, Size, 0.0 >, PSYS_PART_END_SCALE, < Size, Size, 0.0 >, PSYS_PART_MAX_AGE, 0.2, PSYS_SRC_MAX_AGE, 0.00, PSYS_SRC_ACCEL, <0.0,0.0,0.0>, PSYS_SRC_ANGLE_BEGIN, 0.00, PSYS_SRC_ANGLE_END, 0.00, PSYS_SRC_BURST_PART_COUNT, 1, PSYS_SRC_BURST_RADIUS, Height, PSYS_SRC_BURST_RATE, 0.02, PSYS_SRC_BURST_SPEED_MIN, 0.005, PSYS_SRC_BURST_SPEED_MAX, 0.05, PSYS_SRC_OMEGA, <0.00,0.00,0.00>, PSYS_SRC_TEXTURE, Texture ]); } Reminder: you have to stop & restart a particle system to see any changes...( llParticleSystem([]) to stop. ) Edited June 14 by Xiija Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now