Working with HDRP / LWRP



Unity 2018 supports a scriptable render pipeline. This feature is experimental in Unity. https://docs.unity3d.com/Manual/ScriptableRenderPipeline.html. At this time, we don't officially support HDRP and LWRP via the Substance plugin. However, the outputs generated by the Substance plugin will work with the HDRP and LWRP shaders. We will officially support HDRP and LWRP and provide new packing workflows to support the Mask map generation for HDRP. In this guide, we show how you can use HDRP and LWRP in the current beta state of the plugin. 





High Definition Rendering Pipeline

Currently, you can only use HDRP shaders with custom Substance files created in Substance Designer. The Substance plugin doesn't create the mask map at this time, so it needs to be created manually in Substance Designer using the RGBA-Merge node. Substance outputs can be assigned to a Unity material using the HDRP shaders. 

The Mask map for the HDRP shader contains the following data:

  • Red channel: Metallic mask. 0 = not metallic, 1 = metallic.

  • Green channel: Ambient occlusion.

  • Blue channel: Detail map mask.

  • Alpha channel: Smoothness.

Substance Designer Setup:

  1. Create a custom output in Substance Designer and leave the Usage blank. 
  2. You don't need an Ambient Occlusion, Roughness or Metallic Output as this data will be packed. 
  3. Add an RGBA-Merge node to graph and input the following data:
    1. Red channel: Metallic mask. 0 = not metallic, 1 = metallic.

    2. Green channel: Ambient occlusion.

    3. Blue channel: Detail map mask.

    4. Alpha channel: Smoothness. You need to use an invert node to create smoothness from roughness data.

       

  4. Publish the sbsar file and import into Unity

Unity Setup:

  1. Create a new Unity Material with the shader set to HDRenderPipeline/Lit (Ignore the material generated by the Substance) 
  2. On the Substance Graph Object, enable the Generate All Outputs option



  3. Drag the outputs from the Substance to the inputs of the Lit shader. 

Lightweight Render Pipeline

In the current beta version of the plugin, the material generated by the Substance plugin doesn't work with LWRP. However, 
Substance outputs can be used with the LWRP shaders. 

  1. Create a new Unity Material with the shader set to LightweightPipeline/Standard (Physically Based) (Ignore the material generated by the Substance) 
  2. Drag the outputs from the Substance to the inputs of the LWRP shader.