- Interface
- Customizing your workspace
- Home screen
- Main toolbar
- Preferences
- Explorer
- Graph view
- Library
- Properties
- 2D view
- 3D view
- Dependency manager
- Resources
- Importing, linking and new resources
- Bitmap resource
- Vector graphics (SVG) resource
- 3D scene resource
- AxF (Appearance eXchange Format)
- Font resource
- Warnings from dependencies
- Substance graphs
- Substance graph key concepts
- Creating a Substance graph
- Instances and subgraphs
- Graph parameters
- Manage parameters
- 'Visible if' expressions
- Inheritance in Substance graphs
- Output size
- Values in Substance graphs
- Publishing Substance 3D asset files (SBSAR)
- Exporting bitmaps
- Exporting PSD files
- Sample Substance graphs
- Warnings in Substance graphs
- Substance function graphs
- What is a Substance function graph?
- Create and edit a Substance function
- The Substance function graph
- Variables
-
FX-maps
- FX-Maps
- How it works
- The Iterate node
- The Quadrant node
- Using Substance function graphs in FX-Maps
- Warnings in Substance function graphs
- Sample Substance function graphs
- Nodes reference for Substance function graphs
- Scripting
- Plugin basics
- Plugin search paths
- Plugins packages
- Plugin manager
- Python editor
- Accessing graphs and selections
- Nodes and properties
- Undo and redo
- Application callbacks
- Creating user interface elements
- Adding actions to the Explorer toolbar
- Using color management
- Using spot colors
- Logging
- Using threads
- Debugging plugins using Visual Studio Code
- Porting previous plugins
- Packaging plugins
- Scripting API reference
- Substance 3D home
- User guide
- Glossary
- Getting started
-
Interface
- Interface
- Customizing your workspace
- Home screen
- Main toolbar
- Preferences
- Explorer
- Graph view
- Library
- Properties
- 2D view
- 3D view
- Dependency manager
-
Resources
- Resources
- Importing, linking and new resources
- Bitmap resource
- Vector graphics (SVG) resource
- 3D scene resource
- AxF (Appearance eXchange Format)
- Font resource
- Warnings from dependencies
-
Substance function graphs
- Substance function graphs
- What is a Substance function graph?
- Create and edit a Substance function
- The Substance function graph
- Variables
-
FX-maps
- FX-Maps
- How it works
- The Iterate node
- The Quadrant node
- Using Substance function graphs in FX-Maps
- Warnings in Substance function graphs
- Sample Substance function graphs
- Nodes reference for Substance function graphs
- MDL graphs
- Bakers
- Best practices
- Pipeline and project configuration
- Color management
- Package metadata
-
Scripting
- Scripting
- Plugin basics
- Plugin search paths
- Plugins packages
- Plugin manager
- Python editor
- Accessing graphs and selections
- Nodes and properties
- Undo and redo
- Application callbacks
- Creating user interface elements
- Adding actions to the Explorer toolbar
- Using color management
- Using spot colors
- Logging
- Using threads
- Debugging plugins using Visual Studio Code
- Porting previous plugins
- Packaging plugins
- Scripting API reference
- Technical issues
- Release notes
Pixel Processor
In: Atomic Nodes
Complex
Since SD5.0+
Description
The Pixel Processor allows you to execute a custom function for every pixel that is returned as output, on an optional input.
It is by far the most versatile node, as it allows any mathematical operation to be run and return results inside your graph.
Similar to FX-Map, it requires to set up the internal functionality to perform anything. Where the Pixel Processor differs from FX-Map is that it is not focused on placing patterns, with multiple functions controlling pattern shape and placement. Instead, a single function is run in parallel for every pixel, where each pixel is unaware of the calculation results of its neighbors. The Pixel Processor is similar to the Value Processor, which runs on only single values and can provide a nice optimization compared to the Pixel Processor.
For anybody used to creating Shader functions in Node-based editors, the Pixel Processor should be a familiar environment.
An annotated project file demonstrating simple uses of the Pixel processor node is available in the Sample Substance graphs section of this documentation.
Parameters
- Color Mode: Color/Grayscale
Sets what sort of output value is returned - Per Pixel Function:
Allows you to access the internal function editor.
Usage Guide
This section is not a full usage guide, rather it explains a few specifics for the Pixel Processor node. It's recommended to read about creating functions first, before continuing in this section.
Hit Ctrl+E with the Node selected, or Press the Edit button on the node to access the internal function.
Setting outputs
Output type needs to match that set in the Node's Color Mode Parameter:
- Color: output must be a Float4
- Grayscale: output must be a Float(1)
Changing Color Mode while an output is already defined, the node will convert the output to the selected format, but you are losing some performance or calculating too little information.
If the output returns pure black, there is probably an error in the calculations somewhere returning incorrect values.
Using Inputs
Using Inputs in a Pixel processor requires some specific setup unique to the Pixel Processor. It is the main area where the Pixel Processor stands apart from the FX-Map It is very similar to setting up a texture sampler in a Shader editor.
Essentially you specify what input to sample, by using a Sample Gray or Sample Color Node, and then connect a "UV"/position coordinate of the Float2 type to that Sample Node's input.
The above setup samples the input0 slot as a color input, and uses the internal $pos value as the coordinates. $pos matches the X and Y index of the current pixel being calculated, essentially serving as UV-coordinates.
The Position used for a Smaple node does not have to be the $pos value, youn can use any function you want as input, even other sampled maps, or complicated transformed coordinates.
Conversely, you can use the $pos value to drive other effects than sampling an input, such as using it to interpolate between different values across the image: creating your own gradients for example.