Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Light Question..

Malina Chuwen
Evotive
Join date: 25 Apr 2008
Posts: 502
08-18-2008 20:11
Oooooh! This is a REALLY easy question ;) I think I got it right, but I'm curious.

What exactly IS a SL light? Like, what makes it a light? Is it just an object turned "Full Bright", or a particle? I've looked at lights, and they look like objects on "Full Bright". But then couldn't we have limitless lights? I've read that only 8 can be seen at a time, so I'm a tad confused.

(Reason being: Attempting to make some tube lights and am curous, lol)

Wasn't sure if it was Texturing or Building =x
Cheree Bury
ChereeMotion Owner
Join date: 6 Jun 2007
Posts: 666
08-18-2008 20:28
From: Malina Chuwen
Oooooh! This is a REALLY easy question ;) I think I got it right, but I'm curious.

What exactly IS a SL light? Like, what makes it a light? Is it just an object turned "Full Bright", or a particle? I've looked at lights, and they look like objects on "Full Bright". But then couldn't we have limitless lights? I've read that only 8 can be seen at a time, so I'm a tad confused.

(Reason being: Attempting to make some tube lights and am curous, lol)

Wasn't sure if it was Texturing or Building =x


Well, you can make a light by going to the Features tab in the Build dialog and turning on the Light check box.

You have more control of it there than just the Full Bright option. You can change its color, intensity, radius, and falloff.

I am not sure anymore about how many lights there can be, but it is either 6 or 8. Limitless lights would cause way too much lag, so they are limited in number. And I believe it utilizes the closest ones to your avatar.
_____________________
Visit ChereeMotion - Life's Best Pinup Poses
http://slurl.com/secondlife/Wild%20Rice/38/230/51
Dytska Vieria
+/- .00004™
Join date: 13 Dec 2006
Posts: 768
08-18-2008 21:33
Only six light sources can 'illuminate' at a time in SL due to limits of OpenGL. These six light sources will be the six nearest your position.

Most builders will make a prim that is a light source go Full Bright when the light is on and turn off Full Bright when the light is off, at least that is what I do.
_____________________
+/- 0.00004
Grace Loudon
Registered Know-it-All
Join date: 16 Dec 2005
Posts: 99
08-18-2008 21:37
With the Windlight client - or whatever it's called these days - use glow in the textures tab - it gives off the glow of a light - as if it's been turned on. It works beautifully but yes, limits how many you can see at one time. I use it like crazy on my sims - give the prettiest, warmest effect.
Malina Chuwen
Evotive
Join date: 25 Apr 2008
Posts: 502
08-18-2008 22:42
Oh - Lol. Suppose I should check out that Tab some day.

Thank you all ;) Will tinker around with all that a bit! Looks fun.
Malina Chuwen
Evotive
Join date: 25 Apr 2008
Posts: 502
08-19-2008 00:42
Question.. I'm on the "Light" now but when I change it, it changes everything around it instead of the object I'm trying to alter. How do I change the object that I'm actually in the Edit menu with?
Viktoria Dovgal
Join date: 29 Jul 2007
Posts: 3,593
08-19-2008 01:13
From: Malina Chuwen
Question.. I'm on the "Light" now but when I change it, it changes everything around it instead of the object I'm trying to alter. How do I change the object that I'm actually in the Edit menu with?

That's how that works, it makes the prim emit light, not so much be lit. You could stick another prim (perhaps a little invisible thing, much like people do with face lights) to shine light back on your object, or combine with full bright or maybe a bit of glow if you want it to look like a light source.

From: someone
I've read that only 8 can be seen at a time

Two are always taken up by the sun/moon and avatar lighting, so only 6 to play with for now. That restriction may be going away in a few versions, but it would be one of those things like glow that only work for newer video cards.
_____________________
Malina Chuwen
Evotive
Join date: 25 Apr 2008
Posts: 502
08-19-2008 01:31
Ooooh, ok.. Think I got it now ;)

Hope at least, lol. Just seemed to weird for everything to change due to one object.

Will fuss with that some more tomorrow, then! Tis almost bed time.

Thank ya!
Cheree Bury
ChereeMotion Owner
Join date: 6 Jun 2007
Posts: 666
08-19-2008 04:02
From: Malina Chuwen
Ooooh, ok.. Think I got it now ;)

Hope at least, lol. Just seemed to weird for everything to change due to one object.

Will fuss with that some more tomorrow, then! Tis almost bed time.

Thank ya!


It can be a little confusing. The Light option makes it act like a light, not look like a light. I often use totally transparent lights to light my vendors to make the avatar sitting on them look their best.

As the others said, Glow and Full Bright will give you something that looks like a light, and you can change the color and texture to tone it down if it is too bright.
_____________________
Visit ChereeMotion - Life's Best Pinup Poses
http://slurl.com/secondlife/Wild%20Rice/38/230/51
Ceera Murakami
Texture Artist / Builder
Join date: 9 Sep 2005
Posts: 7,750
08-19-2008 08:11
What you generally want to do is for a given "lamp", only have ONE prim in that linkset be the one that is set to emit local light. That prim and any others that are suitable can be set to full-bright when on, so it visually appears to be lit. And understand that the 'light source' is calculated as a pinpoint source at the geometric center of the uncut version of that prim, and not as a glowing surface.

So for a simple example, let's say we have a table lamp with a light bulb in it.

The spherical part of the bulb would be scripted to turn on fullbright and to set local light to 'true' when on, and to turn off fullbright and set local light to 'false' when not lit.

The skinny base of the lightbulb, made from a cut torus, would just toggle fullbright.

The rest of the lamp just shows the lighting changes dictated by the light shed by the bulb.

=============

If you are making light from a campfire, one plane of the flame prims is all that is needed to cast the light. treat it as you would the sphere for the light bulb. All the othr flame prims just need to toggle fullbright. And with a fire, also toggle visibility on or off for each flame prim, depending on if the fire is lit of not.

=============

If you were making a chandilier with 12 candles in it, you would still only want one light source. So you could toggle the "light" property on the metal ring that holds the candles, but NOT toggle fullbright for the ring. And then toggle visibility and fullbright settings for the candle flames. Still only one actual light source, but it looks like theres 12 of them.

=============

Check the LSL scripting information, and you'll find there is a single command that lets you set prim parameters, including fullbright, local light, and visibility.

Here is a simple example: This script should work for a lamp that has a single spherical light bulb as the root prim of the lamp.


default
{
state_entry()
{
llSay(0, "Touch to light";);
state WaitForLight;
}
}

state WaitForLight
{
touch_start(integer total_number)
{
llSetPrimitiveParams([PRIM_FULLBRIGHT, ALL_SIDES, TRUE, PRIM_POINT_LIGHT, TRUE, <1, 1, 1>, 1.0, 10.0, 0.75]);
state WaitForOff;
}
}
state WaitForOff
{
touch_start(integer total_number)
{
llSetPrimitiveParams([PRIM_FULLBRIGHT, ALL_SIDES, FALSE, PRIM_POINT_LIGHT, FALSE, <1, 1, 1>, 1.0, 10.0, 0.75]);
state WaitForLight;
}
}
_____________________
Sorry, LL won't let me tell you where I sell my textures and where I offer my services as a sim builder. Ask me in-world.