Hi.
Is there a tutorial on how to do random coloured lights?
I'm doing a Christmas animation and just wanted to animate bulbs (objects) changing colour randomly.
Many thanks.
Hi.
Is there a tutorial on how to do random coloured lights?
I'm doing a Christmas animation and just wanted to animate bulbs (objects) changing colour randomly.
Many thanks.
I don't know of any specifically but search around I suppose.
I've been doing a lot lately using Luxigons, then linking those to a Master/Slave setup so I can control entire groups at a time, like Kitchen Overheads, etc., not just for intensity but color too. Adapting that to a string of lights would be pretty much the same.
I can whang together some notes later if you don't find anything to your liking.
Earth can't be flat otherwise cats would have pushed everything off the edge!
The Big Apexx System:
AMD RYZEN THREADRIPPER 2990WX Processor (3.00GHz)
64GB
2x NVIDIA Quadro RTX 4000 8GB 32 Core
Thanks Ma3rk. Yes please i would love to see some notes.
I've tried using an image map but it doesn't quite work.
I have text ( letters) with a number of bulbs placed in each letter, so would like to just be able to animate colours changing randomly. Can't work out how to do it!!
Did you try using Node Editor?
Add Tools > Random Vector, plug to color.
or better
Add Tools > Random Integer (or Scalar), plug to Gradient as Input, and set up couple colors in gradient, output plug to color.
Adjust Seed to change color.
You can use Item Info index or Clone Item Index in Extended Item Info node from TrueArt's Node Library 2019 http://nodelibrary.trueart.eu
I used similar technique with Clone Item Index in this video tutorial:
Last edited by Sensei; 12-08-2019 at 04:04 PM.
TrueArt Christmas Promotion with free gift Sasquatch Resurrector!
Sasquatch in LW 2020.0.2:
https://youtu.be/9_kI_IcNA9k
Which version of Lightwave?
If you are prior to LW2018, Light Color have only Color RGB Channels.
In this case Modifier or third party Channel node editor could help,
but per channel.
Denis.
Depends also how many lights you have to setup,
because this could be tedious to paste a node setup for R,G and B Channels,
except if you can position them in a final step.
If you have both DP Kit and nodeChannelFilter node editor (bottom DP Kit menu on my site)
you can use this setup, I added flare on a point Light to see the color in render,
it is varying with the Null X position, you can easily modify the value to speed up or down,
also the basic light color is random tied to its ID,
so if you clone the light, each have a random varying color,
this is a saturated color, only hue variation.
test_randomlightcolor.zip
Denis.
Hum.. Seems that the above setup doesn't work as expected,
the light ID is somehow not correct in the in Color channel context,
not like in a Motion context, will see if I can fix it later.
Denis.
I'm sure there are a number of ways to do this, but this has been working for me anyway. Let's see if I can 'splain this. It's really much easier than it looks & sounds.
Once I have scene set (volumetrics, etc.), I take the object that's going to have lights into Modeler so you can break out a layer that will have your luxigons, so name the new layer accordingly. If they're going to be "aimed" lights like a spot, area or ies, you need to create a poly so it's normal is pointed correctly. Linear Lights use a 2pt poly where you want the tube to be. For Points & sphericals, a single point converted into a 1Pt. poly is all that's needed.
In my example, the chandelier geom had a weird poly for the filament. I isolated them then individually killed the polys & used OD_WeldAveClean to weld them to a single point then converted to 1Pt. polys. I then used Add Luxigon set as Point, Saved object & sent to Layout.
![]()
![]()
In Layout, then make one new light using in my case a spherical & set the basics of size, color, etc. & name it accordingly Like ChandFilament & move this way off set & usually make a black enclosure. You'll see why in a bit.
ENABLE ENVELOPE by clicking the "E" buttons for both Color & Intensity. You'll rename this one after it gets cloned to something like _MASTER.
![]()
Clone the light & rename the original so now you should have your light name_MASTER and the clone.
Select the clone & shift-click the "E" (to clear it)then set the lights color to 0,0,0. Click the "E" again & add a Channel Follower Modifier.
Using the generously sized postage stamp box, navigate to the appropriate channel on the MASTER light. It's ususally at the bottom, but as the scene grows ... Do this for the other two colors & close the Graph panel.
Shift-click the "E" next to the clones Light Intensity & set Intensity to 0. Click the "E" again, add a Modifier but this time set it to MASTERS Intensty value. OK & exit Graph panel.
Now comes the fun part. Select the Luxigon layer, Find Convert Luxigons on the Setup Panel & click. Select your Clone & in a couple seconds, you should see new lights where the filaments were.
![]()
![]()
If you need to change the size of the lights (as I needed to do here), clear them but leave MASTER and (1). Make changes, manually dupe those to (1) & go again with the Convert step.
![]()
![]()
Make all of your changes to the MASTER. Disable the Envelope, make the changes in the Panel, the Re-enable the Envelope.
Proceed then to make other sets with different colors. You'd want to do this even if you set a random or noise mod to the colors or Intens.
Earth can't be flat otherwise cats would have pushed everything off the edge!
The Big Apexx System:
AMD RYZEN THREADRIPPER 2990WX Processor (3.00GHz)
64GB
2x NVIDIA Quadro RTX 4000 8GB 32 Core
Thank you everyone for contributing to the solution
It's going to be a bit like the way Sensei shows in Post #4.
Can it be done without a CSV file? More so done simply with a Null running left to right on repeat so the cloned objects that are representing the lights just change color probably repeating the same colour sequence so I only have to render a certain number of frames?
I have to add I'm not using Layout Lights just objects to represent light-bulbs with a Luminosity that needs to change color randomly.
Again, many thanks for all the possible solutions. There is a wealth of ideas here for other users too.
Last edited by daforum; 12-10-2019 at 07:12 AM.
Random Color on surface of Object is far simpler,
so you don't need RGB channel, just go the Surface node editor.
If you want the same random color on a object,
you copy this node setup in the surface node editor,
for light the R, G and B channels have the same setup except the final Vector Scalar node set to X, Y and Z,
in the surface you can plug directly the Color output of Color Tool or Gradient to the root,
leaving the ItemInfo set to "Self".
if you need both Object/light, the Object should have the same type ID
than the Light, this is the case in an empty scene, first Light and first Object
have the same type ID, then you can parent the light to this object,
clone with hierarchy.
In my setup Color animation is fading smoothly,
or by step, selecting Step mode for the X Position of the Null reference.
Denis.
Last edited by dpont; 12-10-2019 at 07:59 AM.
Also if your bulb objects are identical,
just use instancing, replace Item type ID with Instance ID.
Denis.
As Denis said, this is easier with a "base" bulb which is instanced. The Instance Info node's ID or Random Scalar can be used to generate a random color per instance.
I've attached a LW2019 sample scene which changes the bulb color over time. The Instance ID is used to generate a "frames per change" for each instance, which is then used to multiply the Random Scalar generated from the Instance ID. The multipled value is fed into a plain Random Vector node, which is scaled up to increase the saturation of the generated color and fed into both the Surface's Color and Luminous Color. The Surface has a fairly high Luminosity.
ChristmasTree_RandomLights_GeometryInstances.mov MOV File
To get more consistent colors for the bulbs, use a Gradient node fed by the multiplied value rather than the Random Vector.
Prior to LW2018, the Time node wasn't available, but you can use a 3rd party node, or a Scalar Constant with an Envelope, setting the Envelope's value to a simple Expression:
If you're on LW2018 or after, good luck with the "fireflies" produced by all the luminous surfaces!!
In my sample scene, I used a random set of points from the Tree's perimeter for the Instancer points layer in the Object. This could be a random set of points (or a regular set of points) from the text you're trying to animate with bulbs.
mTp
P.S. I used SkyTracer in the background (F8) to produce a sunset, but when you close the sample scene it will give an error "Scene must have at least one Light" - which is consistent for scenes where the only Light is the SKT_Sun.
Last edited by MonroePoteet; 12-11-2019 at 08:07 PM. Reason: Add MOV file; P.S. on SkyTracer Light error; Random Vector not Make Vector
Bookmarks