Exposing a parameter
Exposing parameters is one of the most powerful tools and is key to opening up your graphs to other applications such as Substance 3D Painter, Substance 3D Sampler and Substance Integrations for Maya and 3DS Max.This page explains all required concepts to get started exposing. It's recommended that you first learn what a Graph Instance is before continuing on this page. It's also good to have a grasp on the difference between Publish and Exporting, as well as the filetypes involved.
Understanding parameters and exposing
*Dashed, transparent lines above are an abstract representation of the connection from exposed parameters to Graph Parameters.
What is a parameter?
A parameter is a simple value, with a UI element, that controls the behavior of a graph. You use them constantly in all Substance software: to change a color, to set blend mode, to choose an opacity value, etc... Without parameters, Substance software would not allow for any customization at all.
Parameters can come in many different forms: sliders, dials, type-in boxes, drop-down menus, etc... The values they represent can be many different types: decimal values, whole (integer) values, boolean (true/false) values, even text snippets.
What is "exposing"?
Exposing is the process of making a parameter available for use outside of your current Graph View. When building a Graph, you usually select a node to change the parameters in its properties; when exposed, you enable access to this parameter from an external control panel. This "external control panel" can mean different things based on the context: when used as a Graph Instance inside Designer, it just acts as another node. When used in Substance 3D Painter, Substance 3D Sampler or an integration, these exposed parameters will be the only control you have over the graph.
Why is exposing useful?
Exposing Parameters is what takes Substance 3D Designer beyond a simple texture editor, allowing you to create customisable, dynamic texture-generation tools. Without exposing, Substance Materials wouldn't be very different from static textures: you'd have no way to modify their outputs.
Why not expose every parameter automatically, all the time?
Substance Graphs can get complicated and can contain hundreds of parameters at once. It doesn't make sense to always show all parameters to a user, especially if you are building graphs with a simple goal, that don't need many parameters. When exposing parameters, you work as a UI or UX designer: you think what controls make sense, which values are required and how to make it easy to use for yourself, for other users online or for your coworkers.
Do I have to know math for exposing? Should I understand Function graphs?
Mathematical knowledge is not required to make good use of Exposing Parameters, nor is the use of functions. As a beginning user you can almost completely avoid having to do mathematical operations in Function graphs. The only thing that is strongly recommended, is a decent base knowledge of the different data types such as Integer, Float and Boolean.
How to expose
Currently there are two main methods to expose parameters. One method is more suited for quickly exposing a single parameter, the second method is more suited for exposing multiple parameters in one sweep.
Single expose method
Find the parameter you want to expose in the Properties Window, under the Specific Parameters tab.
Click the Dropdown options button.
ChooseExpose as new graph input from the drop down list, the first option.
The Expose Parameter dialog appears. Set any parameter properties as you wish. It's recommended to at least change the Identifier and Label.
Press OK to confirm.
The parameter's name turns blue, and the Edit Function button appears next to the Dropdown options confirm the parameter is exposed.
When exposing one parameter, this method will be a bit slower than the previous. When exposing multiple parameters, it is much faster.
Instead of finding a single parameter, find the Multi Expose buttonat the top right of the Specific Parameters tab.
Choose Batch Expose Parameters... from the drop down menu.
The Multi Expose dialog appears, allowing you to customize the exposing of all Specific Parameters from a node.
- Use All, None or specific checkboxes to decide which parameters to Expose
- Click on a parameter name under the Graph Input Identifier column in the list to change its name.
- Click on a Group Name under the Graph Input Group column in the list to add a (sub-)group for one specific parameter
- Use the Graph Input Identifier and Graph Input Group type-in boxes at the bottom to add pre-, suffix and input groups to all exposed parameters at once. All these values are applied on top of the per-parameter settings.
- Click OK to confirm and expose all selected parameters. The parameter names now show blue to confirm the parameters are exposed, as well as an Edit Function button .
There are some limitations tied to exposing parameters, as listed below. Often a workaround is possible using Multi Switch and multiple sets of logic.
|Parameter type (node)||Reason|
|Gradient Ramp, Curve Editor, Font, Levels Histogram||Requires a widget which is not available for user creation.|
|Color Mode (multiple nodes such as Uniform Color, Pixel Processor)||Custom parametrization unsupported; changing color mode on-the-fly is not possible.|
|Blending Modes (Blend node, FX-Map)||Exposed Blend Mode only works as SBS inside Designer. Becomes static and hidden in SBSAR. Use Switch or Multi Switch instead.|
|Tiling Mode||Same as Blending Modes.|
|Patterns, Input Image Alpha, Input Image Filtering (FX-Map: Quadrant)||Only works as SBS inside Designer. Becomes static and hidden in SBSAR.|
Modify exposed parameters
Once exposed, it is no longer possible to access a parameter like before. Changing its value, renaming, arranging in the UI and even removing the parameter all happen on the Graph Properties level. This section details how to do so.
To change an exposed parameter's options either:
- Click on the Dropdown options button next to the already exposed parameter, choose Edit Exposed Graph Input . This takes you straight to the relevant entry in the Graph Properties.
- Double-click in an empty area of your graph to get to the Graph Properties, then find the parameter in the list of Input Parameters.
- Single click on your graph in the Explorer View, then find the parameter in the list of Input Parameters.
All exposed Parameters are listed under the Input Parameters tab. The following properties are available for most common cases such as Floats and Integers with default Editor type.
Identifier: Unique identifier for this parameter. Can not contain spaces or special characters.
Type / Editor: Set the data type as well as the UI editor type. Certain Editors are only available for certain data types (such a drop down list only for Integer). Changing Editor will in many cases wipe default values, be careful.Do not change the Type afterwards, you risk breaking the exposed parameter!
- Description: Textfield for description, used as tooltip.
- Label: UI-only Label. If no Label is defined, the identifier is shown in the UI. Can contain spaces and special characters
- Group: Group, used to organize and group parameters together in separate tabs. Parameters are grouped if they share the exact same Group name (case-sensitive).
- Default: Default value the parameter starts out at. This is also the value used in your graph while previewing nodes. Try to use an easy, useable value here, avoid extreme cases.
- Min: Minimum value for UI
- Max: Maximum value for UI
- Clamp: Set wether Min and Max are soft or hard limits (allow the user to go past the limits).
- Step:Set the precison or granularity of the value.
- User Data: Custom user data, available for any purpose.
- Visible If: Special expression system to show or hide parameters based on external conditions. See Visible if: display/hide inputs and outputs with conditions
Drop down list
A special case is the Drop down list for Integer types. There is no Default, Min or Max, just a single Value setting that allows you to define a list of Items.
- Every Item corresponds to an Item in the Drop Down List.
- The first value for an Item is the actual, internal integer used by the graph. Make sure you set these up correctly for your Multi Switch for example (they start at 1, not 0).
- The second value is the UI Label shown to the user.
- The third checkbox allows you to mark one Item as the default selected one.
- The X deletes an Item, the + adds an Item
Re-ordering of Parameters can easily be done by dragging and dropping the dark, striped handles to the left of the input parameters name in the list. Keep in mind Grouping parameters can affect the order.
As setting up parameters can be difficult without seeing the final result, a Preview Mode can be enabled, to check how the parameters UI will look and behave externally. Click the Preview tab in the top middle of the Input Parameters rollout.
Normally, any changes made in Preview Mode are discarded. You can however use the Apply button next to the eye icon to set the current values of the Preview Mode as the new default values.
Parameters can be copy-pasted between graphs.
A single parameter can be copied with the Copy button. Multiple Parameters can be copied through the Parameters Menu . Choose Copy Inputs to copy all inputs.
Choose Paste Inputsin the Parameters Menu to paste one or more parameters.
If you want to transfer values, and not the actual exposed parameter itself, read about Parameter Presets.
Removing and cleaning exposed parameters
Because of the nature of parameters, where you can have on Input Parameter controlling multiple Nodes, or where Input parameters can exist without controlling a node, problems can arise with missing or unused parameters. Below common issues and their solutions are described.
Tracking broken parameters on nodes
You can track what parameter is used by which node through the Node Finder Tool, which is located in the top bar of the Graph View. Click it and it allows you to find nodes using specific parameters.
If a node has an actual problem, it will display a Warning badgeon its top left corner. Hovering over the badge will display a tooltip with more information.
To reset and remove a problem, for the parameter you want to fix or reset, click on the Dropdown buttonnext to the Edit Function button and select Reset. This returns a parameter to its previous, non-exposed state, the blue name will turn gray again to reflect this.
Cleaning up unused input parameters
If you have lost track of your Input Parameters and no longer know which ones are used, they can be cleaned up using a small tool. Click the Input Parameter menu buttonand select Clean Inputs.
A new dialog appears, listing all unused parameters. Check or uncheck whatever parameters you want to remove or keep, and click OK. If no dialog appears, there are currently no unused parameters to clean up.
To actually remove a parameter that is in use, requires two distinct steps.
- On the node with the exposed parameter, click the dropdown arrow to the right of the Function Expose button that is colored in blue: . Then choose "Reset to Default Value". This removes the use of the parameter on this one node. repeat for any other node making use of the same parameter.
- In the Input Parameters list of the Graph, click the X all the way to the right of the parameter's entry. This deletes the parameter completely. If any nodes try to make use of this parameter, a warning badge will appear (see above).