View Full Version : Light Angle

08-22-2006, 04:52 PM
I've been playing around with the light location node with not a lot of luck.

I had an idea about taking a globe(earth) with a main light, and where ever the light points on the globe you would see a different image map.
Like a dark side with lit cities etc... and a day side typical satallite view.

So where ever the light is pointing it can move around the globe changing the image, a kind of mobile alpha map.

Thanks in advance for any ideas.

08-22-2006, 07:12 PM
You can do this a number of ways. The quickest way could be to take a Spot Info node, feed Smoothed Normal into a Scale Vector node.
Set the scale of the Scale Vector node to -100% and feed the output into the Normal input of a Lambert node.
This will give you light levels as though the light is facing the opposite direction to what it really is.
Use the output from the Lambert node as an Opacity level for a Mixer node, to control the appearance of the shadowed side of the globe.


08-24-2006, 03:56 PM
Thanks, I'll play around with it a bit more.....

08-25-2006, 02:54 AM
How about just using a 90-degree translucency node? I believe it will give identical results, a lot more easily. ;)

01-14-2007, 09:44 PM
This thread is exactly what you want, if I get you right.


01-17-2007, 03:13 PM
Haven't read through martin.s's SpinQuad thread, but this may help out as well -

01-17-2007, 03:24 PM
I haven't followed the links, so it may be mentioned there. A gradient using the light incidence as an alpha would do nicely. Even more so using nodes since you would only need one gradient for all surface attributes (and a few mixers).


01-17-2007, 03:34 PM
I haven't been back on that project for a while, but I think I'll jump back on it with the new info.

Thanks everyone :-)

05-30-2007, 11:43 AM
I've had luck using an object info node's world position connected to an incidence gradient node. Gives me the exact sort of output one would expect.

The only trouble is, it produces a razor sharp line of a terminator. I'm not familiar enough with scalar info and it's related nodes to figure this out... What I'd like to do is blur that transitional line as well as have a little more control of where it lands. IE I'm using it for the predictible control of a Day/Night map for a planet. Right now the result is you see the luminance of the city lights well past the terminator with a bar of no light right on the terminator. I need to cheat it back so that the lights are "coming on" just slightly in advance of the terminator. You know, where it's twightlight on the ground. I've been reading and rereading the node docs, as well as plugging various gradients into the chain, but I just cannot get the result I want.

Any Ideas?

06-25-2007, 12:54 AM
WooT! I've figured it out!

To get a perfect Light Incidence with nodes:

"Item Info (Light) - Forwards" connects to "Incidence - Vector".
The "Incidence - Result" can feed into the Input of a gradient, giving you a perfect light incidence, quickly and easily useable for anything!

Took me about an hour of scowering the internet and trial and error to figure it out, so make good use of it!