Website powered by

Houdini Arnold Light Filters Manager (Houdini/Arnold/Python)

Purpose

My purpose in making this Houdini tool was to have a working, user-friendly Light Blocker Filter that will connect to multiple Lights, but later I decided to have a full-fledge tool to manage all the Light Filters.

Features

  1. List out all the Lights from /obj context, including Subnets.
  2. When you select Lights from the list, 3 sections will update and Light Types will be taken into consideration.
    • Available Light Filters list - List of Light Filters which are available in Scene for selected Lights.
    • Active Light Filters list - List of Light Filters which are active on selected Lights.
    • Add Filter drop-down list - A drop-down list to add a Light Filter on selected Light considering selected Light's Type. That means the drop-down list will show Barndoor Filter for a Spot Light, but not for a Point Light. 
  3. Multi-selection.
    • If you select multiple Lights from the list, it will remember all the Light Types of the selected Lights and list out common Light Filters. For example, let's say you have selected 3 Lights, and one of them is Skydome Light. Since Skydome Light only supports Light Blocker Filter, the Filters list will only show Light Blocker Filters.
    • Just like Lights, you can multi-select Light Filters and do operations, the operation will happen on all selected Lights.
    • Add Filter drop-down list will list out common Light Filters of selected Lights.
  4. To avoid any confusion while selecting Light Filters to do the operations, you can either select Available Light Filters items or Active Light Filters items.
  5. Light Filters are connected to Lights using the Fetch Node, so you get the same effect in all Lights and have only one Filter node to drive them all. That means you can have one Light Blocker Node connected in multiple Lights just like Maya Arnold.
  6. Light Filters generated from the tool will have a prefix "LFM" to differentiate from manually created Light Filters.

How to load

  1. Create a New Tool on your Houdini shelf.
  2. Paste load_ui.py content in the Script tab.
  3. Replace path variable with your current script folder directory and Save.

How to use

Add New Light Filter

Attach, Remove and Disconnect Light Filters

Filter out list

Document


  1. List out all the Lights from /obj context.
  2. List out all the Filters which are available for selected Lights, (Refer to Multi-selection section in Features).
  3. List out all the Filters which are connected to selected Lights, (Refer to Multi-selection section in Features).
  4. Filter out the Lights list.
  5. Clear typed filter and list out Lights list.
  6. Filter out the Available Light Filters list.
  7. Clear typed filter and list out Available Light Filters list.
  8. Filter out the Active Light Filters list.
  9. Clear typed filter and list out Active Light Filters list.
  10. Refreshes UI based on any scene changes.
  11. Attaches selected Available Light Filters to the selected Lights from the list.
  12. Removes selected Filters from Available or Active Light Filters from the Scene.
  13. Disconnects selected Active Light Filters from selected Lights.
  14. Get Light Filters list based on selected Lights, (Refer to Multi-selection section in Features).
  15. You can give a nice name to the new Light Filter, which is Optional.
  16. Adds new Light Filter on selected Lights.

How it works

As you run the tool for the first time, HTOA_LIGHT_FILTERS_SUBNET Node will be created in /obj context with a few necessary nodes inside as shown in the image. When you add a new Light Filter on the Light, it will create a Light Filter Node inside HTOA_LIGHT_FILTERS_VOPNET, and create a link inside the selected Light using Fetch Node. So you will have only one Light Filter node and a Fetch Node connection per Light. That means, you have to change parameters in that Light Filter and it will get applied on all connected Lights.

Additionally, if you create a Light Blocker Filter, it will create a Geometry Node to have a Viewport representation and to place the Light Blocker in your scene.


HTOA_LIGHT_FILTERS_VOPNET - New Light Filters will be created inside this node and where you can edit them.

HTOA_LIGHT_BLOCKER_SUBNET - New Light Blocker Geometry Nodes will be created inside this node.

light/shopnet/arnold_vopnet - A Fetch Node reference will be connected to OUT_light Node.

Light Blocker

When you create a new Light Blocker, it will create 3 nodes:

  1. Light Blocker Filter - Light Blocker Node, where you will change all filter parameters like Geometry Type, Density, etc.
  2. Light Filter Reference - This is a Reference to the Light Blocker Filter inside Light.
  3. Light Blocker Transform - A Geometry for Viewport representation and placement.

Note that the "Light Blocker Shape Control" is in the "Light Blocker Filter". (Refer the image below)

Limitations

  1. Might not work on existing user-created Light Filters.
  2. If you remove any Light Filter, a Fetch Node will still remain inside the non-selected Lights. The Light Filter won't be functional as its parent node will be deleted but will be listed in the tool.