Hi everyone,
I’m trying to create an interactive lighting setup in Houdini using Karma and would appreciate some guidance.
I have a floor made up of multiple individual boxes, all illuminated with the same white-colored light. A ball is bouncing across the floor, and I want the lighting or color of each box to change to blue whenever the ball makes contact with it.
Ideally, the effect would work dynamically: (https://www.youtube.com/watch?v=NuGATtVlXAU)
* All boxes start with white lighting.
* When the ball touches a specific box, that box changes to blue.
* When the ball moves away, the box returns to white (optionally with a smooth transition).
* The setup should work with Karma rendering, preferably in Solaris/USD.
What would be the recommended approach for detecting the contact and driving the color of the corresponding light or emissive material?
Any example node setups or guidance would be greatly appreciated. Thanks!
Interactive Lighting
582 1 2-
- mohitsherman
- Member
- 29 posts
- Joined: Dec. 2012
- Offline
-
- cheesetroyer
- Member
- 54 posts
- Joined: Nov. 2016
- Offline
I think you need to learn about attributes. They can help you drive almost all of the things relevant to this question..
In practice:
Points on a grid.
Points are white
Bouncing ball is blue
Attribute transfer "Cd" from ball to points.
If you want there to be a fade, add a trail sop, you can even choose the duration of frames..
Copy to points, boxes to points.
Resulting boxes have same color as points, as far as I remember.
In Solaris / LOPS -> karma material: geometry color, to import the color from SOPS to LOPS.
You could also use that to control the glow of the boxes, since black is 0 and white is 1 ( which can be used to control many shader properties and attributes (like roughness, glow etc.)
You could start your setup in SOPS with black and white, instead of blue and white and then when bringing that into your Karma material, with "geometry color", you could adjust the color with a ramp, to whatever you like.
Geometry Color:
https://note.com/ryokucharyoku2/n/n6e82d801c927?hl=en [note.com]
https://www.sidefx.com/docs/houdini/nodes/lop/geometrycolor.html [www.sidefx.com]
Karma Ramp:
youtube.com/shorts/msbr4n8qel8
More in-depth videos on making Pong and attribute transfer. Quite similar to what you want, I think:
youtube.com/watch?v=pxSqt7_hoOs
youtube.com/watch?v=p_Z1eC1jjPY
Lights maybe:
sidefx.com/docs/houdini/solaris/support/geometry_lights.html
sidefx.com/docs/houdini/solaris/kug/lights.html
In practice:
Points on a grid.
Points are white
Bouncing ball is blue
Attribute transfer "Cd" from ball to points.
If you want there to be a fade, add a trail sop, you can even choose the duration of frames..
Copy to points, boxes to points.
Resulting boxes have same color as points, as far as I remember.
In Solaris / LOPS -> karma material: geometry color, to import the color from SOPS to LOPS.
You could also use that to control the glow of the boxes, since black is 0 and white is 1 ( which can be used to control many shader properties and attributes (like roughness, glow etc.)
You could start your setup in SOPS with black and white, instead of blue and white and then when bringing that into your Karma material, with "geometry color", you could adjust the color with a ramp, to whatever you like.
Geometry Color:
https://note.com/ryokucharyoku2/n/n6e82d801c927?hl=en [note.com]
https://www.sidefx.com/docs/houdini/nodes/lop/geometrycolor.html [www.sidefx.com]
Karma Ramp:
youtube.com/shorts/msbr4n8qel8
More in-depth videos on making Pong and attribute transfer. Quite similar to what you want, I think:
youtube.com/watch?v=pxSqt7_hoOs
youtube.com/watch?v=p_Z1eC1jjPY
Lights maybe:
sidefx.com/docs/houdini/solaris/support/geometry_lights.html
sidefx.com/docs/houdini/solaris/kug/lights.html
-
- Quick Links

