The two identical images below illustrate the difference in just setting the light filter and setting it plus scripting the filter (addCone in this case). Using FILTER:light alone just turns out the stage lights!
![]() |
![]() |
| Set inline
STYLE="FILTER:light" |
Set inline STYLE="FILTER:light"
In the BODY tag include: onLoad=
{santa2.filters.light.addCone(160,200,0,100,100,255,0,0,100,20);} |
Note that when we say we are "adding" a light, this means like to a darkened stage. We are not "adding" to the ordinary view of an image or text, but to the completely blacked out version! This explains why when you "add" ambient light, the result is darker than what you started with!!
Syntax & Setting
In STYLE the light filter is created with the simple syntax:The actual type of light source is set with script. The various choices are listed under Light in the filters list.
Multiple Lights
Just as on a stage, you can have several different lights shining on the same object or on different parts of the page. There is a limit, however, of 10 lights for each Visual Filter control. To have more lights, you must create more Visual Filter controls by creating different objects to apply your lights to, in groups of 10 or less. You will start running into time lags on the rendering with very many lights, especially if they are being manipulated thru scripts.
Combining Lights
You should also be aware of how light colors combine with each other and with the existing colors on the page.
Let's first check on the effect of lights on existing color.
The buttons below define spotlights which are exactly the same except for color.
Clicking and reclicking will add light sources. Remember that only 10 can be applied at a time, including repeats. The "Remove filters" button will reset everything so you can start over.
![]() |
How do the lights interact just with each other?
The circles below are white with a black edge. Red, Green, and Blue cone lights have been created centered directly above the circles. These lights are centered over their respective circles at a z-distance of 90, strength of 100, spread of 300.
Turn on the lights by clicking the buttons. Note how the colors blend where the lights overlap.
|
|
Notice the center section where all colors overlap is now white!
Can you find areas of purple, yellow, and orange?