glowing object (newbie particle question)
|
|
Jeremy Bender
anachronistic iconoclast
Join date: 12 Aug 2006
Posts: 99
|
11-08-2006 09:05
I am starting to work with particles in a small way and I understand a bit of the basics of how the script is laid out and the various parameters, (I can make various kinds of crappy smoke/steam etc.), but the task I need to accomplish seems kind of impossible to me so far. What I want is a glowing spherical object but if I use a standard particle generator, the particles are generated from a point source at the centre of the prim, so they always look like they are coming from inside when when what I am after is for the surface of the sphere to glow. It would be nice if the particles were able to be affected by wind and motion also, and if they are coming from the centre of the sphere, this would look awful. I have only thought of two possibilities, (below) both of which are unsatisfactory so if anyone has a better idea please post it. First, I suppose one could cover the surface of the sphere with particle emitters like a mesh or web, then the particles would be coming from the surface instead of deep inside. Unfortunately this would mean lots and lots of emitters and would never be "smooth" AFAICS. Secondly, I could simply use huge-ass particles that are slightly bigger all around than the sphere and have as their texture the glowing fringe effect I need to see. But if I do that then why use a particle system at all since the particles or texture boards in question will rarely need to move or do anything anyway. I am sure glowing objects have been made before, what is it I am missing? Is it possible to designate a 2D surface rather than a point source for particles?
|
|
Raeyan Aldrich
Registered User
Join date: 14 Oct 2006
Posts: 44
|
11-08-2006 09:10
http://lslwiki.com/lslwiki/wakka.php?wakka=ExampleParticleScriptthat's a very easy to use script for working with the particle system the area you want to play around with is below, the radius, rate, count, life etc will help you modify the particles till you get the effect you're looking for // Particle paramaters float age = 1; // Life of each particle float maxSpeed = 1; // Max speed each particle is spit out at float minSpeed = 1; // Min speed each particle is spit out at string texture = ""; // Texture used for particles, default used if blank float startAlpha = 1; // Start alpha (transparency) value float endAlpha = 0.1; // End alpha (transparency) value vector startColor = <0,1,0>; // Start color of particles <R,G,B> vector endColor = <1,0,0>; // End color of particles <R,G,B> (if interpColor == TRUE) vector startSize = <1,1,1>; // Start size of particles vector endSize = <1,0,1>; // End size of particles (if interpSize == TRUE) vector push = <0,0,0>; // Force pushed on particles
// System paramaters float rate = 1.5; // How fast (rate) to emit particles float radius = 1; // Radius to emit particles for BURST pattern integer count = 1; // How many particles to emit per BURST float outerAngle = 1.54; // Outer angle for all ANGLE patterns float innerAngle = 1.55; // Inner angle for all ANGLE patterns vector omega = <0,0,0>; // Rotation of ANGLE patterns around the source float life = 0;
|
|
Jeremy Bender
anachronistic iconoclast
Join date: 12 Aug 2006
Posts: 99
|
11-09-2006 09:27
Thanks for the reply, I will just play around with the settings some more I guess. This still doesn't seem like it a 2D surface can be set as the origin point of the particles as opposed to a point source, which was my main question - someone please correct me if that is wrong - therefore a 10 metre sphere with particle effects will still appear to have particles coming from the centre of the sphere and not the surface. If the particles are each ten metres on a side and the sphere was 9.5 or something it might work but even then, if they are affected by wind or other forces, it would instantly cease to look like a "surface glow." I was just interested in how others might have solved this same problem. I am guessing multiple particle systems in the same prim perhaps, most of which with little to no interaction or movement and using (huge) custom particle textures.
|
|
Joannah Cramer
Registered User
Join date: 12 Apr 2006
Posts: 1,539
|
11-09-2006 10:02
From: Jeremy Bender This still doesn't seem like it a 2D surface can be set as the origin point of the particles as opposed to a point source, which was my main question You can use PSYS_SRC_BURST_RADIUS switch to determine how far from the centre of prim the particles are born... note it only has effect if you don't enable PSYS_PART_FOLLOW_SRC_MASK switch.
|
|
Jopsy Pendragon
Perpetual Outsider
Join date: 15 Jan 2004
Posts: 1,906
|
11-09-2006 11:43
Hi Jeremy-
Some quick thoughts: 1 big particle "halo" effect surrounding your sphere has the advantage over a 'prim' texture halo in that the texture will always face the viewer's camera and never be seen at an angle.... so the halo will always appear perfectly round.
Particle textures seem to max out at 4m by 4m, not 10m x 10m however.
Like Joannah mentioned, RADIUS will help but using FOLLOW_SRC will disable it. You can kind of 'fake' the follow_src behavior and leave radius on by making your particles live only for a very brief period of time... and replentish them quickly. (tiny values for burst rate and particle max age).
For explode and angle patterns, try setting your SPEED_MIN & MAX settings to 0.01. In some cases if particle's initial velocity is 0.0 will prevent particles from being seen. 0.01 is slow enough that it's hard to tell they're moving. With radius and relatively short lived particles you can make a convincing sphere... with a radius of up to 50m! =)
I hope this helps! Feel free to IM me if you have questions!
_____________________
* 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!
|
|
Jeremy Bender
anachronistic iconoclast
Join date: 12 Aug 2006
Posts: 99
|
11-10-2006 13:30
From: Jopsy Pendragon Hi Jeremy- Some quick thoughts: 1 big particle "halo" effect surrounding your sphere has the advantage over a 'prim' texture halo in that the texture will always face the viewer's camera and never be seen at an angle.... so the halo will always appear perfectly round. Particle textures seem to max out at 4m by 4m, not 10m x 10m however. Like Joannah mentioned, RADIUS will help but using FOLLOW_SRC will disable it. You can kind of 'fake' the follow_src behavior and leave radius on by making your particles live only for a very brief period of time... and replentish them quickly. (tiny values for burst rate and particle max age). For explode and angle patterns, try setting your SPEED_MIN & MAX settings to 0.01. In some cases if particle's initial velocity is 0.0 will prevent particles from being seen. 0.01 is slow enough that it's hard to tell they're moving. With radius and relatively short lived particles you can make a convincing sphere... with a radius of up to 50m! =) I hope this helps! Feel free to IM me if you have questions! This is all great information and I really appreciate it. Can't wait to try it out this weekend. The RADIUS parameter alone will help tremendously and your "pro tips" will give me an inside edge. I have found many particle scripts since I started looking for them, and read the wiki as well and they all seem to have the same failing in that none of them really tell you what the various parameters do. Most commenting in the files is vague or tautological and less than informative. Some descriptions like "start alpha" and end alpha" are kind of obvious, others much less so. Even more frustrating is that almost none will tell you what values can be entered, so you can never be sure when tinkering, if you are using an excessively large or small value for one parameter or another. Anyway thanks again and I will post my results here in about six months or so when I actually finish the project 
|
|
Jopsy Pendragon
Perpetual Outsider
Join date: 15 Jan 2004
Posts: 1,906
|
11-10-2006 15:02
Drop by the particle lab sometime... I've set up demonstrations for each of the particle settings. =D (There's even a gizmo that shows what the old and confusing INNERANGLE and OUTERANGLE were doing for people that remember being frustrated by them) It's bad enough not knowing min/max and default values... or knowing whether you want larger or smaller values. To make matters worse, there's several values that undermine or greatly exaggerate others. The radius and follow_src being just one of several... For example, just by using a bizarre option called PSYS_PART_LINEAR_TARGET_MASK, which when enabled suddenly dactivates a bunch of other settings you may have wanted, like PSYS_PART_WIND_MASK, PSYS_SRC_ANGLE_BEGIN, PSYS_SRC_ANGLE_END, PSYS_SRC_BURST_RADIUS, PSYS_SRC_SPEED_MAX, PSYS_SRC_SPEED_MIN, PSYS_PART_ACCEL, and PSYS_SRC_PATTERN gets forced to PSYS_SRC_PATTERN_DROP (but bounce still has an effect even though it probably shouldn't) { Oh yeah and forces on PSYS_PART_FOLLOW_SRC_MASK }. And if the emitter isn't targetting some OTHER prim you end up with a black hole, where particles can't escape!
_____________________
* 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!
|