Master scene :
This master scene setup helps you bring in your objects step by step, from the bottom up in your node tree. It lets Houdini load **only** the inputs you choose, which helps keep things faster and lighter. This is done using **switch nodes** and **edit context options**.
You could also use **prune nodes** to hide objects, and it would look similar—your object won’t show up in the **Scene Graph** or the **viewport**. But there’s a big difference: prune nodes only hide the object, they don’t stop it from loading. The object is still in memory and being processed during rendering. With a **switch**, if it’s turned off, the object isn’t loaded at all—so it saves resources.
⚠️ **Warning:** This method needs to be followed carefully. If not set up properly, you might start a render and realize some parts of your scene are missing. (Trust me, it’s happened more than once\!)
Switch :
For your switches, here’s the structure to follow:
Start by importing your first asset. Then, create a chain of **switch nodes**. Each switch will be controlled by an attribute. Later, you’ll create a **edit context option** node to define this attribute—setting it to **0** when you don’t want the asset to load, and to **1** when you do want it to load.
You’ll repeat this setup for each layer of your 3D scene, so you can control which parts are loaded or skipped.
editcontextoptions :
In the **edit context options** node, you can create as many options as you need usually one per asset.
By default, a new option is set to **String** type, but since **switch inputs expect numbers**, you'll need to change the option type to **Number**. The **option name** should match the attribute used in your switches above.
By setting this option to **1**, the corresponding asset will be loaded. If you set it to **0**, it won’t load.
With this setup, **only the assets set to 1** will be imported into your render layer. The others simply won’t load at all no need to prune them afterward, because they were never loaded in the first place.