Configuration


The Substance in Houdini plugin can be configured by editing the substance configuration file. 

PlatformLocationFilename
windowsC:\Users\"USERNAME"\Documents\houdini17.0\dso\substancesubstance.cfg
mac osxMacOS/Users/Shared/houdini/17.0/dso/substancesubstance.cfg
linux~/houdini17.0/dso/substance/substance.cfg

Substance in Houdini is using the principled shader for rendering. The Substance engine and shader can be configured in a .cfg file.



SubstanceToPrincipled.cfg
Set the reflect to 0. 

substance.cfg
Set the engine to use the GPU for the platform you are using.

Substance Engine

Using the configuration file, you can change the Substance engine type, which controls how the Substance textures are computed. CPU engine computes up to 2K and GPU computes up to 4K. In the substance configuration file, set the "engine" tag to the engine value you wish to use for a given platform. 

This value sets the engine to be the CPU engine (sse2)

"engine": "sse2"
WindowsEngine
sse2CPU
d3d10GPU - Direct3D 10
d3d11GPU - Direct3D 11
LinuxEngine
sse2CPU
ogl2GPU - OpenGL 2.x
Mac OSXEngine
sse2CPU
ogl2GPU - OpenGL 2.x


Shader

By default, Substance in Houdini is using the principled shader as denoted in the configuration file. This points to the "SubstanceToPrincipled" file, which allows you to set various texture attributes such as displacement bound, mantra shader as well as channel mappings. You can override this in the configuration file by setting the renderer flag to use a custom shader.  You can create your own shader file to support 3rd party renderers. 

Substance configuration file:

"renderer": "substance/SubstanceToPrincipled.cfg"

SubstanceToPrincipled file:

 //Displacement bound offset used for raycasting
  "displacebound": "0.505",


  //these parameters will be applied for the surface shader
  "surface": {
    //The shader specifies the name of the mantra shader to invoke when rendering substance SHOPs
    "shader": "opdef:/Shop/principledshader?SurfaceVexCode",

    //This map is used to specify parameters that should be used regardless of substance channel usage
    "general": {
      "reflect": "1"
    },

    //These parameters will only be added if the parenting channel exists within the substance SHOP. The full list is:
    //  diffuse, basecolor, opacity, emissive, ambient, ambientOcclusion, mask, normal, bump,
    //  height, displacement, specular, specularLevel, specularColor, glossiness, roughness,
    //  anisotropyLevel, anisotropyAngle, transmissive, reflection, refraction, environment,
    //  ior, scattering0, scattering1, scattering2, scattering3, metallic
    "channels": {
      "diffuse": {
        "basecolor_usePointColor": "0",
        "basecolor_texture": "%map%",
        "basecolor_useTexture": "1",
        "basecolor": "(1 1 1)"
      },
      "basecolor": {
        "basecolor_usePointColor": "0",
        "basecolor_texture": "%map%",
        "basecolor_useTexture": "1",
        "basecolor": "(1 1 1)"
      },
      "metallic": {
        "metallic": "1",
        "metallic_useTexture": "1",
        "metallic_texture": "%map%"
      },
      "roughness": {
        "rough": "1",
        "rough_useTexture": "1",
        "rough_texture": "%map%"
      },
      "specular": {
        "reflect_useTexture": "1",
        "reflect_texture": "%map%"
      },
      "normal": {
        "enableBumpOrNormalTexture": "1",
        "normalTexture": "%map%"
      },
      "emissive": {
        "emitcolor_useTexture": "1",
        "emitcolor_texture": "%map%",
        "emitcolor": "(1 1 1)"
      }
    }
  },

  //these parameters are applied to the displacement shader
  "displacement": {
    "shader": "opdef:/Shop/principledshader?DisplacementVexCode",
    //"general": {},
    "channels": {
      "displacement": {
        "dispTexTexture": "%map%",
        "enableDispTexture": "1"
      }
    }
  }
}