PDA

View Full Version : Light color



pdrake
03-14-2019, 01:02 PM
I need a little help. Is there a way to change the color of a group of lights together? Can a group of light's color be controlled with an envelope?

Does anyone have a good surface for milk white acrylic?

thanks in advance!

Sensei
03-14-2019, 04:13 PM
There is possible workaround/trick.
In LW 2019 (perhaps LW 2018 too), there is Node Editor in Light Properties, where you can edit light color.
So open it, add e.g. Item Info object, make Null, and pick it in the node, and plug output like Scale or Rotation of null to Light color.
Then repeat with other light items.
Pick up null, Scale or Rotate it, and the all lights will change color. This trick will work with everything you want to control, when there is available Node Editor.


Edit:
Alternative (even better way):
In Light Properties Node Editor add Light Info, pick up reference light item from drop-down, get color and plug to target Light color.
Duplicate in couple other lights.
Change of single light color, will distribute color to the all other lights.

Sensei
03-14-2019, 05:26 PM
Edit:
Alternative (even better way):
In Light Properties Node Editor add Light Info, pick up reference light item from drop-down, get color and plug to target Light color.
Duplicate in couple other lights.
Change of single light color, will distribute color to the all other lights.

I tried it, and it works good, but you have to remember to set Light Properties color to white, otherwise it's multiplied by what you receive in Node Editor.

MonroePoteet
03-15-2019, 10:14 AM
Prior to the nodal access to the control of a Light's color, you can also use an Expression in the Graph Editor. What version of LW are you using?

mTp

pdrake
03-15-2019, 11:39 AM
Thanks for the answer. I've been too busy to even notice 2019 came out.

pdrake
03-15-2019, 12:15 PM
Can you post a screen shot of the node set up?

jwiede
03-15-2019, 03:38 PM
(deleted)

MonroePoteet
03-15-2019, 07:05 PM
The node setup to control multiple Lights from a "base light's" color is this:

144444

In this case, I set up a Light called Light_ForColor, used it in the Light Info node, and fed its color into the three Color inputs for the spotlight. The spotlight can then be cloned and positioned around the "stage":

144446

...and now, for something completely different... :)

Personally, I like doing "group control" with a control Null, using various channels on the Null to control parameters.

I don't know if it's anything like what you're after, but I've attached a sample scene which controls a set of four Lights using a Null called LightControlNull. A single Light was set up with the various node networks and expression, and then Cloned and repositioned about the "stage".

The channels of LightControlNull used are:

X,Y,Z = Red, Green, Blue for the color
H,P = angular offset from a Target Null (Bank would just rotate the Light around its axis)
X Scale = Light Intensity

All of the four Light's color, intensity and direction in the sample sequence were done by just changing the channels on the Null.

144435 144436

144437 144438

144439 144440

MOV file: 144441

The Light's color was set up with the Light's node network, simply feeding the Null's X,Y,Z vector into the Light's colors. The Intensity of the Light isn't available in the node network so I used an Expression in the Graph Editor:

144442

The Light's angular motion was done in the Nodal Motion node graph, first pointing the Light at the LightTargetNull and then adding in the Rotation vector of the LightControlNull:

144443

Although the X,Y,Z approach to setting the Light bank's color doesn't allow a Color Picker selection, I find that it's really convenient to just change the Null's X,Y,Z using the standard mouse movements is really quick and easy. The Graph of the control node's X,Y,Z can be manipulated just like normal, sliding the various color channel keys up and down, etc., and seeing the results in VPR.

144445

So, for the sample scene, with the LightControlNull selected, I just set the frame to 30, 60, 90, etc., and then hit "t" to set the bank of Light's color, "h" to set their intensity, and "y" to have them wander away from pointing directly at the LightTargetNull. And, almost as quickly as it's said, I can move on to the next keyframe.

As a help, I constrained the X,Y,Z movement of the LightControlNull to between 0.01 and 1.0 in each axis so the Color was always within a positive range below 1.0:

144448

Have fun!
mTp

pdrake
03-15-2019, 09:31 PM
Thank you so much. I have to control a pixel strip to animate the lights on an internally lit sign we're building for a client. the only way i could think to do it was with a couple hundred point lights. i thought about a lum map, but i'd first have to animate that.

MonroePoteet
03-16-2019, 10:28 AM
OK. If you post an example image of what you're trying to accomplish it may be feasible to do it without hundreds of lights. Animating a luma map / color map is easy.

mTp

Ma3rk
03-16-2019, 11:59 AM
Same here; thanks a heap for that MP. I'll certainly be analyzing & disecting your scene eventually.

pdrake
03-17-2019, 04:37 PM
This is a decent example of the lighting that will be in the sign.

https://www.youtube.com/watch?v=afPKmbIzRa0

MonroePoteet
03-20-2019, 04:08 PM
OK, thanks for the example video. If the patterns & colors you want for the LED strip is as complex as that shown in the video, I'd probably draw the pattern(s) in an image editor and apply them as a moving Image Texture.

Attached is a sample LW2015 scene which uses a Spline to shape the chain of LED bulbs into a shape similar to the one in the video. The LED Bulbs layer in the Object was modeled down the negative Z axis to make it "compatible" with the Spline control. A curve was drawn in CurveForSpline layer to shape the set of bulbs.

I drew the following 100x100 image in an image editor:

144512

which was then mapped to the LEDBulbs object on the Y axis, set up the size correctly (Autosizing first and then set the X dimension to 5) and then moved in the -X direction using an Envelope on the Image's X Position:

144513 144514

With the LEDBulbs surface set to 1000% Luminosity, Global Illumination turned on and set to 300% puts a glow around the LED strip, although it's pretty noisy and chaotic:

144515 144516

144517 144518

MOV file: 144519

Using the same technique in LW2019 using the new rendering engine might produce a better, more even glow but my experimentation was that it was EXTREMELY noisy even with high AA samples. A rendering expert might be able to get the noise to a reasonable level and I haven't tried the GPU denoiser.

I used a Spline to shape the LED chain because I don't know how to use the Animation UV Cycler available for UV mapped images, and you can't apply a moving envelope to the Position of a UV Mapped image (too bad!). It probably does a similar function, but I didn't have time to research / experiment. To use a UVMap, BEFORE shaping the chain of bulbs into the desired shape I'd apply a UV map in the appropriate dimension, then shape the LED bulb chain into the desired shape.

Note that in the sample scene / render sometimes one or more LED bulbs are only partially lit (e.g. half lit). To avoid this, I think you can fine-tune the size of the image (e.g. for 100 bulbs with 200 frames I should have used a 100x200 image to map) and making sure how fast it moves doesn't put a row of pixels in the middle of some of the bulbs. For the sample scene I disabled Pixel Blending and Mipmaps, and tried a "ModulusXMotion" Expression, but still ran into the problem.

Good luck!
mTp

COBRASoft
03-21-2019, 06:27 AM
It would be handy to have a 'global' node with custom attributes that the user can add to own liking. Each attribute should have E button for animation.
E.g.:
Custom global node name: GlobalLight
Added Color attribute: LightColor
Added Scale attribute: LightScale
Added Rotation attribute: LightRotation
...

then this global node can be added to any node editor of an object/light/... and connect the wanted attributes. This would make stuff a lot easier imo.

daforum
03-21-2019, 07:21 AM
OK, thanks for the example video. If the patterns & colors you want for the LED strip is as complex as that shown in the video, I'd probably draw the pattern(s) in an image editor and apply them as a moving Image Texture.

Attached is a sample LW2015 scene which uses a Spline to shape the chain of LED bulbs into a shape similar to the one in the video. The LED Bulbs layer in the Object was modeled down the negative Z axis to make it "compatible" with the Spline control. A curve was drawn in CurveForSpline layer to shape the set of bulbs.

I drew the following 100x100 image in an image editor:

144512

which was then mapped to the LEDBulbs object on the Y axis, set up the size correctly (Autosizing first and then set the X dimension to 5) and then moved in the -X direction using an Envelope on the Image's X Position:

144513 144514

With the LEDBulbs surface set to 1000% Luminosity, Global Illumination turned on and set to 300% puts a glow around the LED strip, although it's pretty noisy and chaotic:

144515 144516

144517 144518

MOV file: 144519

Using the same technique in LW2019 using the new rendering engine might produce a better, more even glow but my experimentation was that it was EXTREMELY noisy even with high AA samples. A rendering expert might be able to get the noise to a reasonable level and I haven't tried the GPU denoiser.

I used a Spline to shape the LED chain because I don't know how to use the Animation UV Cycler available for UV mapped images, and you can't apply a moving envelope to the Position of a UV Mapped image (too bad!). It probably does a similar function, but I didn't have time to research / experiment. To use a UVMap, BEFORE shaping the chain of bulbs into the desired shape I'd apply a UV map in the appropriate dimension, then shape the LED bulb chain into the desired shape.

Note that in the sample scene / render sometimes one or more LED bulbs are only partially lit (e.g. half lit). To avoid this, I think you can fine-tune the size of the image (e.g. for 100 bulbs with 200 frames I should have used a 100x200 image to map) and making sure how fast it moves doesn't put a row of pixels in the middle of some of the bulbs. For the sample scene I disabled Pixel Blending and Mipmaps, and tried a "ModulusXMotion" Expression, but still ran into the problem.

Good luck!
mTp

That's rather cool!!

It looks fairly straight forwards , so will this work in earlier versions of LW?

MonroePoteet
03-21-2019, 09:07 AM
That's rather cool!!

It looks fairly straight forwards , so will this work in earlier versions of LW?

Yes, I've used this technique for a LONG time - I don't think there's anything here that won't work back to even LW8 or before other than maybe the Global Illumination quality / characteristics.

mTp

pdrake
03-21-2019, 12:19 PM
Wow, thanks!

jbrookes
03-29-2019, 03:19 PM
Very nice (both the group light color null and LED sign examples).

That and the other thread with the edge glow example.

The more cool lighting effects, the better! Thanks for the groovy solutions.

MonroePoteet
03-30-2019, 09:40 AM
Glad you like them! The two fundamental techniques are very powerful in almost every aspect of LW - using a Null's channels for controlling a wide variety of parameters on some other entity or set of entities (e.g. an animation rig, the Light bank example shown, controlled multi-dimensional Displacement, etc.), and the moving Textures technique, whether Procedural or Image type textures. Keep them in mind!

mTp