About
The Substance integration introduces a few new elements. These elements are:
- The Substance asset references a Substance archive file (.sbsar) and stores its set of current parameter values.
- The Substance shader references a Substance asset.
- The Substance preset is used to store a Substance asset including the Substance archive file and a parameter set in the Content Browser.
These elements are typically handled with the functions described in Substance Functions Manual.
Substance Assets
A Substance asset is not represented by a dedicated class. Instead a basic BaseList2D element is used. The parameter IDs are stored in nsubstanceasset.h
.
- ::ID_SUBSTANCE_ASSET: The type ID of a Substance asset.
- Note
- To get the parameter IDs of input parameters use GetSubstanceInput(). To get the IDs of the output channels use GetSubstanceOutput().
GeData data;
if (data.GetBool())
@ SUBSTANCEASSET_FILENAME
Definition: Nsubstanceasset.h:9
@ SUBSTANCEASSET_STATUS
Definition: Nsubstanceasset.h:8
@ SUBSTANCEASSET_ENABLED
Definition: Nsubstanceasset.h:12
NONE
Definition: asset_browser.h:1
#define MAXON_SOURCE_LOCATION
Definition: memoryallocationbase.h:69
#define ApplicationOutput(formatString,...)
Definition: debugdiagnostics.h:204
#define ConstDescID(...)
Definition: lib_description.h:592
static const Int32 ID_SUBSTANCE_ASSET
ID of the Substance asset.
Definition: lib_substance.h:170
Substance Shader
The Substance shader references a Substance asset and a selected output channel in Cinema 4D's material system (or all other places, where shaders can be used). The parameters are defined in xsubstance.h
.
- ::ID_SUBSTANCE_SHADER: The ID of the Substance shader.
See also Materials and Shaders Overview.
if (shader == nullptr)
material->InsertShader(shader);
do
{
String outputName;
if (validOutput && typeIsBump)
{
}
@ SUBSTANCESHADER_CHANNEL
Definition: Xsubstance.h:8
Py_ssize_t char * output
Definition: unicodeobject.h:985
SUBSTANCE_OUTPUT_TYPE
Definition: lib_substance.h:314
BaseShader * CreateSubstanceShader(BaseList2D *const asset)
void * GetSubstanceOutput(BaseList2D *const asset, void *const graph, void *const prevOutput, UInt32 &outputUid, SUBSTANCE_OUTPUT_TYPE &type, String &name, BaseBitmap **bmpPtr)
BUMP
Definition: lib_substance.h:8
@ MATERIAL_BUMP_SHADER
Definition: mmaterial.h:300
@ MATERIAL_USE_BUMP
Definition: mmaterial.h:34
maxon::Bool Bool
Definition: ge_sys_math.h:46
maxon::Int32 Int32
Definition: ge_sys_math.h:51
maxon::UInt32 UInt32
Definition: ge_sys_math.h:52
PyObject ** type
Definition: pycore_pyerrors.h:34
Substance Presets
Substance presets can be stored in the Content Browser.
- ::ID_SUBSTANCE_PRESET: The type ID of a Substance preset.
Substance Preferences
The Substance preferences define the type and behaviour of the integrated Substance Engine and influence the workflow of working with Substance assets. The parameters are defined in prefssubstance.h
.
- ::ID_SUBSTANCE_PREFERENCES: The ID of the Substance parameter group.
BaseContainer*
const bc = worldContainer->GetContainerInstanceWritable(
PREFS_SUBSTANCE);
if (bc == nullptr)
#define PREFS_SUBSTANCE
Substance Engine.
Definition: lib_prefs.h:54
@ PREFS_SUBSTANCE_ENGINE_CREATE_MATERIAL
Definition: prefssubstance.h:15
@ PREFS_SUBSTANCE_ENGINE_CREATE_MATERIAL_NO
Definition: prefssubstance.h:16
Further Reading