So far, we have checked Camera, Resolution, Frame Range and Visibility pmodifier. All of them
already had pre-defined parameters to control.
But, there are also many other pmodifiers which doesn’t have any pre-defined parameters. For
those pmodifiers, you have to tell renderStacks which parameters you want to control. If not,
renderStacks would not do anything.
One of such pmodifier is LightOn pmodifier. it allow you to turn on/off lights per pass.
- Load renderStacks_Tut_001.max .
- Add “AllOn”, “OffLeft” and “OffRight” passes.
- Select OffLeft” pass.
- Add “LightOn” pmodifier.
- At the top, the pmodifier shows what it is controlling, “#Light On/Off”.
- Right click where is says “Rightclick here to add Objects”.
All command for managing parameters to use is in this right click menu.
- Click add/Edit
The universal parameter selector dialog will pop up. You will see this dialog every time when you need to choose parameters to control.
On the right, you have the Available parameter list. You can select parameters to control here and press “<” or “<<(Select All)” to move them to “Selected” list. Then, press “Set” to bring in to the pmodifier.
Press “<<” button.
Press “Set” button.
You can see “ArnoldLight001” and “ArnoldLight002” are added the pmodifier. All good. But,
what’s the dropdown icon next to “ArnoldLight002”?
- Click the dropdown icon.
You can see “ArnoldLight002” and “ArnoldLight003” in the list. Wait? Where was “ArnoldLight003”? It was not in the Available list. It was not there because “”ArnoldLight002” and “”ArnoldLight003” is instanced. You can not turn on “ArnoldLight002” while turning off “ArnoldLight003”. Therefore, renderStacks will shows only one light among each light instances in the Available list. Then, shows instances in the pmodifier as a dropdown as a visual indicator.
- Turn off checkbox on “ArnoldLight002” row.
- Open “OffRight” pass.
- Select “Base_LightOn” pmodifier.
- Press Duplicate Nodes button to localize the pmodifier.
- Turn off the checkbox for “ArnoldLight001”.
- Click “OffLeft” pass. You can see “ArnoldLight002” and “ArnoldLight003” are turned off.
- Click “OffRight” pass. You can see “ArnoldLight001” is turned off.
- Click “AllOn”. All 3 lights are on since it is using base state.
- For next step, Select “ArnoldLight002” or “ArnoldLight003” and make unique.
- Make a “Capture” pass.
- Select “Base_LightOn” pmodifier in the pass.
You can see “ArnoldLight002” or “ArnoldLight003” is now a separate entry. When you deinstance lights in the pmodifier, it will automatically make a new entry for them with same value per pass.
Capture Value From Scene
You can change light on/off from the pmodifier UI. But, sometimes you might want to turn on
off lights in the scene and update pmodifier value according to your scene.
- Make sure you are still on “Capture” pass and select “Base_LightOn” pmodifier.
unless you have turn off viewport update of LightOn pmodifier, your scene will be changed by
the pmodifier if you try to open UI later. Therefore, make sure open pmodifier UI FIRST before
adjust the scene!
- Turn off all 3 lights using modify panel.
- Rightclick object list.
- Select “Capture All from Scene”.
- All checkbox will be off.
- You can also capture only selected lights by using “Capture Selected From Scene”
Let’s check one more pmodifier which is using same concept. RendererParams pmodifier
allow you to control almost all renderer parameters.The current;y supported parameter types
are number, on/off, color and dropdown. If the value of parameter is array or string, they are
not supported yet.
- Select “OffLe.” pass.
- Add “RendererParams” pmidifier. You can add with right click menu, too.
Right click > Add to open the parameter select dialog. That’s long list!
- Fortunately, there is a “Search” box. Type “buck”.
- Select “bucket_size : 64”
When you search, you can also search by value since the item shows the parameter name and
value together. For example, if you want to search a threshold value, typing the current Render
Setup dialog value 0.001 would be easier.
- Double click. The parameter will move to “Selected” list.
- Press “Set”.
- Change the value to 128.
- Preview the pass with Preview button.
- Activate other passes.
You can see other passes use 64 pixel for bucket size since that’s what base RendererParams modifier has. 64 pixel was the value which renderer has when the base pmodifier was created.
OK. This the end of our 3rd tutorial. Now you should be able to use most pf pmodifiers!