Automation Toolkit Home
The Substance Automation Toolkit provides features for automating Substance based tasks. It has two main components:
Command Line Tools, these are a set of command line tools for baking maps for meshes, doing simple modifications to substances, creating substance archives and rendering out maps.
Pysbs - Python API, the Python API is a python package for reading and modifying sbs files such as assembling composite materials from multiple substances or batch renaming nodes in files.
The combination of these two packages allows you to fully automating the task of generating maps for large sets of assets based on rules and build your own tools for Substance related tasks.
Welcome to Pysbs documentation, the Python API for .sbs files !
Pysbs provides a way to get information on substances (.sbs and .sbsar files), and to generate or modify substances without using Substance Designer Application, but by scripting in Python.
- The API can be used for different purposes related to creation content pipeline and automation, for instance:
Dependency and asset management
Substance variation creation
Substance automatic generation using bakers output map for instance
Detailed documentation
- Getting started with the API
- API overview
- Basic manipulation of a Substance
- Creation of a Substance from scratch
- Modification of Substances
- Dependency path storage method
- Dependencies management
- PySBS batchtools presentation
- Package metadata manipulation
- SAT and Spot colors
- Generate thumbnails
- Edit sbsar with SBSARManager
- SAT demos
- demohelloworld module: A very simple function that creates a basic Substance, which uses the API without argument file
- demos module: Set a sample functions to demonstrate the use of the API, using argument files
- demos_batchtools module: Set a sample functions to demonstrate the use of the API with the batchtools, using argument files
- script_update_with_sbsupdater: Script allowing to update all Substances in a folder using the Batch Tool SBSUpdater
- API Content
- Demos
- demohelloworld module: A very simple function that creates a basic Substance, which uses the API without argument file
- demos module: Set a sample functions to demonstrate the use of the API, using argument files
- demos_batchtools module: Set a sample functions to demonstrate the use of the API with the batchtools, using argument files
- script_update_with_sbsupdater: Script allowing to update all Substances in a folder using the Batch Tool SBSUpdater
- Substance definition
- common_interfaces module: Common interfaces
- sbsarobject module: Base class of all SBSAR objects
- sbsobject module: Base class of all SBS objects
- package module: Common interfaces related to sbs and sbsar packages (Package, ParamInput, GraphOutput, Preset)
- basegraph module: Common interfaces related to graphs in sbs and sbsar packages
- metadata module: Common interfaces related to metadata
- sbsarchive module: Substance archive definition (.sbsar)
- sbsargraph module: SBSARGraph definition
- sbsarmanager module: SBSAR file manipulation
- sbsarmetadata module: SBSAR file metadata interface
- sbsargui module: SBSAR objects related to user interface
- sbsarguiwidgets module: SBSAR objects related to user interface
- sbsarenum module: SBSAR format enumeration
SBSARGlobalVarSBSArchive
- substance module: Substance definition (.sbs)
- graph module: Graph and Function definition
- compnode module: Compositing node definitions
- params module: Parameters definition (dynamic or constant)
- sbscommon module: Common classes related to SBS package
- sbspreset module: Preset file management (.sbsprs)
- sbsprj module: Substance Designer project file management (.sbsprj)
- ModelGraph module: ModelGraph definition and all objects related to ModelGraph
- modelgraph module: ModelGraph definition
- modelannotationnames module: List all name for ModelGraph annotations
- modelgraphgenerator module: Handle all function to generate ModelGraph's objects
- modelgraphimplementation module: Handle basic values definition for the graph implementation
- modelnodenames module: List all node names available into ModelGraph
- modeloperand module: Operands definition for all ModelGraph operand's types
- ModuleGraph module: ModuleGraph definition and all objects related to ModuleGraph
- modulegraph module: ModuleGraph definition
- modulegraphgenerator module: Handle all function to generate ModuleGraph's objects
- modulegraphimplementation module: Provide an interface for derived implementation
- modulenode module
- modulenodeimplementation module
- modulenodeinstance module
- moduleparaminput module
- moduleoperand module
- moduleannotation module
- moduleconnection module
- modulegraphlibrary module
- modulegraphregister module
- moduleoutputbridging module
- common_interfaces module: Common interfaces
- Libraries
- sbsenum module: Types and enumeration
ParamTypeEnumInputValueTypeEnumTypeMasksEnumAttributesEnumBitmapFormatEnumInputEnumOutputEnumFilterEnumBaseParamEnumCompNodeParamEnumFunctionEnumFunctionInputEnumFxMapNodeEnumTextureFormatEnumMipmapEnumUsageEnumComponentsEnumColorSpacesEnumUsageDataEnumResourceTypeEnumParamInheritanceEnumTilingEnumOutputFormatEnumOutputSizeEnumPixelRatioEnumQualityEnumColorModeEnumBlendBlendingModeEnumAlphaBlendingEnumChannelShuffleEnumCombineDistanceEnumCurveTypeEnumGradientAddressingEnumGradientOrientationEnumNormalFormatEnumNormalAlphaChannelContentEnumMipMapModeEnumFilteringEnumTextAlignEnumFX_PatternTypeFX_BlendingModeEnumFX_InputImageAlphaEnumFX_InputImageFilteringEnumFX_SelectorEnumBitmapResizeMethodEnumWidgetTypeEnumWidgetOptionEnumWidgetEnumGUIObjectTypeEnumCompImplementationKindEnumBatchToolsEnumGraphTemplateEnumBaseTypeEnumUVTileFormatGraphTypeEnumMaterialModelEnum
- sbslibrary module: Substance libraries
- sbsdictionaries module: Dictionaries of all strings used in the libraries
- sbslibclasses module: Classes used by the library
- sbsfilters module (not exposed): Filters definition
- sbsfunctions module (not exposed): Functions definition
- sbsfxmapnodes module (not exposed): FxMap nodes definition
- sbswidgets module (not exposed): GUI Widgets definition
__convertToEnum()getAllWidgetFunctionButtonByType()getAngleWidgetByType()getButtonWidgetByType()getColorWidgetByType()getDefaultWidget()getDropDownWidgetByType()getEnumButtonsWidgetByType()getFilterDefinition()getFilterEnum()getFunctionDefinition()getFunctionEnum()getFunctionGetType()getFxMapNodeDefinition()getFxMapNodeEnum()getInputBridgeDefinition()getIterationParamInput()getOffsetWidgetByType()getOutputBridgeDefinition()getPositionWidgetByType()getSliderWidgetByType()getTransformationForwardWidgetByType()getTransformationInverseWidgetByType()getWidgetByType()
- sbsbakers module: Baking Parameters library
- sbsbakersenum module: Definition of all the enumeration used by the baking parameters
- sbsbakersdictionaries module: List of dictionaries related to the bakers
- sbsbakingparameters module: Definition of the BakingParameters object
- sbsscenedata module: Definition of the SubMeshColor and SubMeshSelection object
- sbsbakersdef module (not exposed): Bakers definition
- sbsbakersdefaultprops module (not exposed): Definition of the bakers default properties
- sbsbakingconverterparam module (not exposed): Definition of the BakingConverterParam and BakingGlobalParam objects
- sbsbakingconverter module (not exposed): Definition of the BakingConverter object
getBakerDefaultIdentifier()getBakerDefinition()getBakerEnum()
- sbsenum module: Types and enumeration
- Helpers
- autograph module: Automatic generation and layout of graphs: easier way to create function graphs using arithmetic operators
- batchtools module: Utilities to call the Substance Batchtools
- sbscleaner module: Substance cleaner: allows to clean useless parameters and nodes of graph and function
cleanSubstance()cleanUnusedDependencies()cleanUselessNodesInDynamicValue()cleanUselessNodesInFunction()cleanUselessNodesInGraph()cleanUselessParametersInFunction()cleanUselessParametersInGraph()getUselessNodesInDynamicValue()getUselessNodesInFunction()getUselessNodesInGraph()getUselessParametersInFunction()getUselessParametersInGraph()
- sbsexporter module: Substance exporter: used to export a .sbs file with its dependencies into a self-contained package
- sbsgenerator module: Substance generator helper
createCompFilterNode()createCompInstanceNode()createCurveParamsArray()createEmbeddedSVG()createFunction()createFunctionInstanceNode()createFunctionNode()createGUIObject()createGradientMapParamsArray()createGraph()createGroup()createIcon()createImportedBitmap()createImportedResource()createInputNode()createInputParameter()createIterationOnPattern()createLinkedResource()createOutputNode()createPreset()createResourceNode()createSBSDocument()createSBSParamInputFromSBSARInput()
- sbsimpactmanager module: Allows to propagate changes made on a Substance to all its references in a particular tree
- sbsparser module: Substance parser: used to deserialize a .sbs file
- sbswriter module: Substance writer: used to serialize SBSDocument into a .sbs file
- psdparser module: Adobe Photoshop Document (.psd) file parser
- qtclasses module: Helpers classes to read/write PyQt objects
- Execution context
- Demos
- Command Line Tools
- substance3d_baker — Bakes out mesh specific data such as ambient occlusion or normal data to textures.
- substance3d_baker command line options
- substance3d_baker Example Command Lines
- Bake 1024x1024 normal map for a mesh
- Bake 512x512 material color map from a high resolution map to the texture space of a low resolution mesh
- Bake 512x512 material color map from a low resolution mesh
- Bake 512x512 curvature map and control the name and the image file type
- substance3d_baker run, use a Designer baker preset file as input
- sbscooker — Cooks .sbs files to .sbsar files ready to be rendered with sbsrender.
- sbsmutator — Modifies and specializes .sbs files.
- sbsrender — Renders out maps from .sbsar files.
- sbsupdater — Updates .sbs files to the current version of the batch tools.
- substance3d_baker — Bakes out mesh specific data such as ambient occlusion or normal data to textures.