Multiple Lights Flickering

   2507   1   0
User Avatar
Member
3 posts
Joined: June 2020
Offline
Hi!

Can someone tell me an efficient way of creating an array of small lights (i.e. 10x10) that flicker randomly? How could I do this procedurally?

Thanks
User Avatar
Member
9 posts
Joined: Feb. 2019
Offline
Hi stavdee,
Nearly a year later...
I had to solve this problem recently, so I thought I'd respond to this in case anyone else comes looking.

Just following this page on Sidefx gets you most of the way there:
https://www.sidefx.com/docs/houdini/render/instancinglights.html [www.sidefx.com]

You'll want to create a master light that you can procedurally instance around the scene where you need it. In my example scene, I just scattered some points inside the object level Instance node, but you can merge in specific points if you created them elsewhere.

The key here is that any attributes you pass into the points will be inherited by the instanced lights. So you can create randomness or noise on say an "intensity" attribute for your points.
To get that attribute to drive the lights, you use a point() expression on the master light "intensity" parameter that grabs the "intensity" attribute from the point it is instanced from. So the one in my example scene looks like:
point("/obj/instance_points/OUT_POINTS", instancepoint(), "intensity", 0)

The only thing you don't get is a representation of each light's intensity or color in the viewport, you must render to see that. Just use a color node on some copied spheres to visualize your attributes in the viewport.

Here's my little example scene if anyone wants to check it out.

Attachments:
lights.png (814.6 KB)
flicker.mp4 (413.9 KB)
lights_flicker.hiplc (848.6 KB)

  • Quick Links