-
Aditional question Moving Light
hi,
jscheuer1 answered cheri about the moving light effect directions and duration:
http://www.dynamicdrive.com/forums/s...28&postcount=5
My question is: can you modify the code so i can choose a different color instead of black? ( acording to the background color of any page... )
thanx
Niv
-
-
I would direct you here:
http://msdn.microsoft.com/en-us/libr...1(VS.85).aspx#
for all the technical specifications on the filter used in this script. It may help you to get what you want out of it.
Also, to help you, I will explain some of the concepts of filter light. It is an attempt to mimic light. White light is a combination of all colors at peak brightness, and black isn't light, it is the absence of brightness and of color.
To shine a light, you must have a dark place to illuminate. If you take a flashlight, or even a strong spotlight out on a sunny day, you will notice little effect from it.
Now, the images that you are going to shine your light on also have color (light) at various levels throughout. This will blend with the ambient light of the filter to create the apparent light value of the unilluminated portion. So, unless you use black as the ambient color, and a relatively low degree of illumination, there will be blending. How this works out will vary from image to image. If your images are all similar in their illumination values, it could be relatively uniform in appearance, but there will generally be no set value you can use, it would be more a case of trial and error to match the background color of a page. Black (the absence of all color) is easy, as I say because black is black, and all black matches.
I will play around with this script to see if I can offer any more specific help for this in a later post.
-
The Following User Says Thank You to jscheuer1 For This Useful Post:
Niv Hamagniv (05-23-2008)
-
OK, after playing around with this script a bit more, I've discovered that for some reason, if you give the image an ambient light, the movement routines will no longer work. This is not the case however in the script that this one was originally developed from. I'm taking about:
http://www.dynamicdrive.com/dynamicindex4/spotlight.htm
Still, even when one gives an ambient light, it is overridden by the spotlight. The spotlight can then be given color, but the unilluminated area will still be black or tending to black, not lending itself to blending in with a page's background color if other than black.
So, as far as I can tell, what you are asking for cannot be done with this filter.
-
The Following User Says Thank You to jscheuer1 For This Useful Post:
Niv Hamagniv (05-23-2008)
-
hi john,
thank you for your time,
your explanation was enlightening.
Niv
-
-
It just occurred to me that the effect you are looking for might be able to be achieved relatively easily by using an alpha channel transparency png image. It could be made to look like a spotlight in a way by being completely transparent in a circular center area the size of your 'spotlight' and blending (anti-aliasing, in image editing terms) to a solid color that matches your background color at the edges. It could then be positioned over the images and moved about. The details are a little tricky, but workable. I did something like this for text at one point, so I'll see if I can find that.
On the plus side, it's cross browser, while the filter is not. It will need some help in IE 6 though, because that browser doesn't do alpha channel png images correctly, but usually can be made to do so.
-
The Following User Says Thank You to jscheuer1 For This Useful Post:
Niv Hamagniv (05-23-2008)
-
OK, I found the previous work. It's all in black and white, but the colors (unlike with the filter) can be fairly easily changed precisely to suit:
http://home.comcast.net/~jscheuer1/side/flashlight/
and perhaps more interesting because it shows that this can do what filter cannot (to wit, 'shining' a dark onto a light):
http://home.comcast.net/~jscheuer1/s...light/dark.htm
If this looks like it has at least the basics of what you have in mind, let me know - when I have more time I will see if I can adapt it to the type of automatic action the script we were originally talking about in this thread has. Or, if you have a different sort of effect in mind, now is the time to be specific.
-
The Following User Says Thank You to jscheuer1 For This Useful Post:
Niv Hamagniv (05-23-2008)
-
Hi John,
I accept your offer to be specific…
The background color of the page I'm talking about is #B4B5AF
Or : Hue=47, Sat=9, Lum=168.
Or : R=180 , G=181, B=175
( one kind of grey )
The idea of the desired effect is this:
An image, on this background color, would be "invisible", until the "moving light"
or the "spot light" will - sort of - "Bring it to life" ( let it shine in its own true colors)
In a "right to left" moving effect… …and then let it 'disappear' again in the gray background,
in the same manner. (…and on and on…)
Actually, it doesn’t matter if the image "starts" invisible or visible.
What matters is the way of it disappearing in the background…
And showing up again.
So far the desires….
I thought, maybe, to limit the necessary parameters of the function,
to those of the gray color… …But maybe I'm "out of my element" here, Dude.
Thank you very much, again
with respect,
to you, and the BIG Lebowski
Niv
-
-
Before you replied, I began playing around with this idea some more:
http://home.comcast.net/~jscheuer1/s...light/pg_s.htm
If that's at all close to the idea (I know the color is different) let me know. Also let me know any other areas where it would need to be different (besides the color).
-
The Following User Says Thank You to jscheuer1 For This Useful Post:
Niv Hamagniv (05-23-2008)
-
Still a work in progress, but we are definitely getting there:
http://home.comcast.net/~jscheuer1/s...1_175_m_oo.htm
What do you think?
-
The Following User Says Thank You to jscheuer1 For This Useful Post:
Niv Hamagniv (05-23-2008)
-
Hi John,
this is almost perfect.




a few thing though:
1.the round shape of the spotlight. can you make it rectangle or
something...?
( the effect of a vertical "line" instead of a round shape,
creating a horizontal wipe)
[ just as it is, but not round ]
2. can you make it possible to change the desired color of the effect?
( to choose any RGB values or #, to be the "default" color of the effect)
( to be able to change it easily in the code)
3.if it is possible, i want to be able to set the size ( width of visible part of
the image).
for example: if the image is 700X150,
i want to be able to choose the size of the "running rectangle spotlight"
so always 300X150 will be visible,
Or 650X150 will be visible [ basicaly- to start showing the image and
when reaching the end, start fading it...]
what i want is just to be able to control the size of the effect by myself...
3.this one (http://www.dynamicdrive.com/forums/s...28&postcount=5 )
goes from side to side,
i want it to be a full wipe from one side to the other, and then again...
{ instead of
left to right
right to left,
a full wipe from right to left ( untill the image is invisible again )
and then
again: a full wipe from right to left.}
thank you very much for your time again.
Niv
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks