Community
REC Advanced Lighting 8.0
Add On: REC Advanced Lighting System. 8.0 COMPLETE REWRITE.

Script use in root, 80 Kb
Script use added to vehicle, 80 Kb

ENTIRELY NEW SYSTEM. USES NOTECARDS TO SET UP LIGHT GROUPS AND LIGHT PROPERTIES.

The old created mesh still serves a purpose it can be used for light Projectors weather seen or unseen. It is in this box Labelled "Some Sample Additional Light Projectors".

Now on to the meat.

-------------------------------
LIGHT_GROUPS

The key to the system is the LIGHT_GROUPS this is how the system knows which prim and face to illuminate.

The following LIGHT_GROUPS are already set up in the notecards to interact with the vehicles lighting addon (menu) and the Remotes.
Those of you already familiar with REC Advanced Lighting 7.2 will recognize them.

HEAD < headlights. headlights do not cast light and wont react to "hi lo" beams they're basically for looks, see PROJECTORS below.
RUN < run lights (engine on)
DOMES < dome lights
BRAKES < brake lights
REVERSE < reverse lights
LFBLINK < left front blink
RFBLINK < right front blink
LRBLINK < left rear blink
RRBLINK < right rear blink
PROJECTOR < hi beam and lo beam use the same projector, projects light on the ground in front of the vehicle.
LOBEAM < hi beam and lo beam use the same projector, projects light on the ground in front of the vehicle.
INDICATOR < dash indicator for when your hi beams are on.
HIDE < simple hide, useful for convertibles, spoilers, etc.
ACCESSORY < Accessory lighting
NEON < Neon lighting
PANEL < dash lighting
COVERS < those pesky lenses covering up your headlights glow can now be hidden when your lights are on.
EXAMPLE_ADDITIONAL_LIGHT < example of how to create your own light group, more on that later.

-------------------------------

The pesky notecards:

This brand new system uses two notecards to define your LIGHT_GROUPS and light properties. Any combination of shell lighting can be lit. At minimum, turn signals must have different faces. Anything else, including creating your own light groups, is possible. For shells that do not have a different face for the turn signals I have included some flat mesh that is already set up to create a light with.

-------------------------------

Setting up the "LightNames" notecard:


LIGHT_GROUP, LinkName, Face or Face List

As defined in the top of the LightNames notecard, heres how this would be set up.

HEAD, Headlight_FL,0,4 < "HEAD" is the headlight light group, "Headlight_FL" is the Prim name and the faces on that prim that you are illuminating are 0 and 4.
For ALL_SIDES just put, ALL_SIDES instead of 0,4

Lets do another,

RRBLINK,RR,3 < "RRBLINK" is the right rear blinker light group, the prim name is "RR" and the face being lit is 3

You can also put multiple lights on one prim, so if all your blinkers, run lights, and headlights are all faces on the prim named Headlight_FL thats entirely workable.
so, using our same prim from the headlights,

LFBLINK,Headlight_FL,3 < "LFBLINK" is the left front blinker light group, "Headlight_FL" is the prim name, and 3 is the face you are lighting.

How you would create a light not defined in the pre-existing would be as this example,

EXAMPLE_ADDITIONAL_LIGHT,map light,2 < "EXAMPLE_ADDITIONAL_LIGHT" is an example light group you just created by putting that there, "map light" is the prim name, and the face being lit is 2. Then you would simply fill out line 5 of this script to match and place it in your switch prim.



Fill out or alter the existing lines, any you dont plan do use, just eliminate, make sure not to leave any spaces or page breaks after the last line. THe script will let you know if a prim name doesn't exist or a face is wrong.

------------------------------------------------------

Setting up the "LightConfig" notecard:

LIGHT_GROUP, , AlphaOn, GlowOn, FullbrightOn, , AlphaOff, GlowOff, FullbrightOff, Emitter, EmitterRange, EmitterIntensity, EmitterFalloff,

As defined in the top of the LightNames notecard, heres how this would be set up.

I have pre-setup most of these - so the only time you should have to alter this is if your not using a particular LIGHT_GROUP, or want to add your own LIGHT_GROUP.

Some examples,

HEAD, <1,1,1>, 1, .1, TRUE, <1,1,1>, 1, 0, FALSE, FALSE, 10.0, 1.0, .5, <1,1,1>

"HEAD" is the headlights group, just like the other notecard,
1st value is color when on, = <1,1,1>
2nd value is alpha when on, = 1 (visible)
3rd value is glow when on, = .1
4th value is fullbright when on, = TRUE
5th value is color when off, = <1,1,1>
6th value is alpha when off, = 1 (visible)
7th value is glow when off, = 0

** You get the idea reading through the string right? Its much the same as our 7.2 script was, only strung out in a notecard. **

As you can see from PROJECTOR and LOBEAM , the distance the light travels and the glow level is different between the two even though they use the same prim to illuminate with.

PROJECTOR,<1,1,1>, 1, .1, TRUE, <1,1,1>, 0, 0, FALSE, TRUE, 20.0, 1.0, .5, <1,1,1> = glow level .1 distance, 20
LOBEAM,<1,1,1>, 1, .05, TRUE, <1,1,1>, 0, 0, FALSE, TRUE, 15.0, 1.0, .5, <1,1,1> = glow level .05 distance 15

Also to note, they are hidden when off, (alpha when off setting = 0)

Also to note, on the last line of this notecard, there is our custom LIGHT_GROUP again, controlled by our switch,

EXAMPLE_ADDITIONAL_LIGHT, <1,1,1>, 1, .1, TRUE, <1,1,1>, 1, 0, FALSE, FALSE, 10.0, 1.0, .5, <1,1,1>

As in the LightNames notecard fill out or alter the existing lines, any you don't plan do use, just eliminate, make sure not to leave any spaces or page breaks after the last line. The script will let you know if something is wrong.

-------------------------------



This switch allows you to control any additional lighting (LIGHT_GROUPS) you may want to add to your Notecards. See script comments on what to change.
-------------------------------



HiLo Beam Switch put in something on dash. HiLo Beams absolutely relies on Projection prims being used, has no effect on "Headlights" simply increases and decreases Distance, Falloff and Glow on the projection prims.

Works very well with "Indicator" prim. (Blue thing for dash now illuminates when Hi Beams are on and goes off when low beams are on)

------------------------------

Conclusion:

This script has been a long learning process for me, hopefully it wont be as painful for you, but i believe we now have the best lighting setup of anyone, at the lowest script use in Secondlife.

As usual see my picks for help and support, maybe we can talk Breezy into a new video?

Laters!

~ Tech





3 of 17 people found this helpful.   




Powered by LiveZilla Helpdesk