Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Seeking a lightscript that are longer than a ”bulb”

PetGirl Bergman
Fellow Creature:-)
Join date: 16 Feb 2005
Posts: 2,414
09-11-2005 00:47
I seek a lightscript that are longer than a ”bulb” - lets pretend a fluorescent lamp (tube) that shall glowe in the dark or dawn...

Tks for all suggestions and maybe a script to???
a lost user
Join date: ?
Posts: ?
09-11-2005 02:07
Not really sure what you are asking here as a prim with light material can be any shape that is possible with the build tools. May be you should elaborate on what kind of light you want. Or are you talking about the Local Lighting "effects"?
PetGirl Bergman
Fellow Creature:-)
Join date: 16 Feb 2005
Posts: 2,414
09-11-2005 03:17
My English are (sad).. I do another try to explain what i seek...


I know about the prim and light and all. But i seek a script that add a ”night glow ” - al way - if the prim are 15 cm or 150 cm long.. not in the middle at one single place as the one i have now...
a lost user
Join date: ?
Posts: ?
09-11-2005 03:42
I can only assume you mean the actual light that is hitting the objects around the light, which is actually more to do with the way the Local Lighting works in the game. From what I understand, it is similar to how particles emit only from the centre of the prim. So what you would actually need to do is have multiple prims along the length of the light object. You will have to experiment with how many prims to use, and the length they should be. There isn't really a way to make a "long light" but you can have "round lights" joined together in a line.

The alternative to this would be to create a phantom prim that acts as the beam of light. The prim would be the shape of the beam of light, and would be semi-transparent so that when it hits objects, the semi-transparency of the prim changes the color of those objects. This is really more of a building question than a scripting question to be honest.
Julian Fate
80's Pop Star
Join date: 19 Oct 2003
Posts: 1,020
09-11-2005 20:19
PetGirl, if I understand correctly, you want a diffuse glow around the lightsource that fits closely whether it is a spherical bulb or a long tube or anything in between, yes? There are a few solutions.

One is to use a particle effect, which it sounds like you have tried. However, you can adjust the horizontal scale of the particle to better fit your light like so:



Here is the bare-bones particle system I used:

CODE
default {
state_entry() {

// Adjust PSYS_SRC_BURST_RATE and PSYS_PART_MAX_AGE at the bottom to
// adjust the rate at which the glow "pulses".
// PSYS_PART_START_SCALE determines the width and height of the particle.
llParticleSystem([ PSYS_PART_FLAGS, PSYS_PART_INTERP_COLOR_MASK | PSYS_PART_EMISSIVE_MASK,
PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_DROP,
PSYS_PART_START_SCALE, <2.0,0.25,0>,
PSYS_PART_START_ALPHA, 0.5,
PSYS_PART_END_ALPHA, 0.0,
PSYS_SRC_BURST_PART_COUNT, 1,
PSYS_SRC_BURST_SPEED_MIN, 0.0,
PSYS_SRC_BURST_SPEED_MAX, 0.0,
PSYS_SRC_BURST_RATE, 0.5,
PSYS_PART_MAX_AGE, 6.0
]);
}

}


Unfortunately, this only works if you can control the angle from which people view the light. If they look at it from the wrong angle the particle will not be centered, as in the following image.



Another possibility, if you have spare prims, is to use semi-transparent prims to simulate a glow. Copy your light and expand it slightly, making each layer more transparent. This is a nice sci-fi effect, very crisp and clean.



My recommendation is to use a glow texture. Create a texture with a white glow in the shape of your light and a transparent background. Apply the glow to a thin flat prim and center it along your light. Since it is white you can tint it any color you need. The following image shows from top to bottom a glow texture, the light and its glow, and the prims used.



I hope this helps and that this is what you were asking. :) If you want a copy of this glow texture just let me know.
RyeDin Meiji
Reluctant Entrepeneur
Join date: 15 Mar 2005
Posts: 124
09-12-2005 06:48
I would like a copy of the glow texture, please.

And bravo on the tutorial! I would have never thought to use multiple semi-transparent prims like that to create the gradient effect. That gives me a lot of ideas too. Thanks!
_____________________
if (!you)
{
who();
}
Zak Escher
Builder and Scripter
Join date: 3 Aug 2003
Posts: 181
09-12-2005 09:29
I would like a copy of the glow texture as well.
_____________________
Zak Escher
Unity Shapes
http://slurl.com/secondlife/Hatteras%20Island/125/46/31
http://unityshapes.blogspot.com/
See what I have for sale at SLExchange