Author Topic: [ERROR][SBSCooker]Variable type mismatch:  (Read 372 times)

Hello

When trying to perform rendering with automation toolkit 2018.2.0 on a substance saved with Substance Designer 2018.2.2 I get the following:

Code: [Select]
[ERROR][SBSCooker]Variable type mismatch:

      Variable Name: background_color

      Of Type: Float

      Accessed By: Get Float4

      While Evaluating Parameter: background

      In Graph: pkg:///tile_random?dependency=1290776988

      Node ID: 1207746925

   ... (repeated 2 more times)

[ERROR][SBSCooker]Cooking fail [Error 13]

The error seems to be within the the files made by the substance team.

I cannot update since this is the max my license allows. This was working fine with some older versions (2018.1) so it looks like a regression.

Could anyone help me out here? Should I edit pkg:///tile_random?dependency=1290776988 manually somehow?

Hello,
The log you're showing seems to concern sbscooker, can you share with me a snippet code or the command line you're trying to run?

Thanks!



Hello,

You are right, this does not concern the renderer. That's further in my pipeline.

So this happens when trying to export. The command goes like this:

Code: [Select]
'C:\\Program Files\\Allegorithmic\\Substance Automation Toolkit\\sbscooker', '--inputs', 'D:/Projects/AssetPacks/Master/Assets/Temp/tmp.sbs', '--includes', 'C:\\Program Files\\Allegorithmic\\Substance Automation Toolkit\\resources\\packages', '--quiet', '--size-limit', '13', '--output-path', 'D:/Projects/AssetPacks/Master/Assets/StylizedWoodPlanksMaterials01//Materials/Substance', '--output-name', 'StylizedWoodPlanksMaterials01'
Not sure if this helps but this is the python script that is called from within Unity
Code: [Select]
import sys
import ntpath
import os
import subprocess

def run_command_popen(cmd):
    sp = subprocess.Popen(cmd, stderr=subprocess.PIPE)
    out, err = sp.communicate()
    if err:
        print(err.decode('ascii'),file=sys.stderr)
    sp.wait()

def exportSbsar(sbsPath, outputPath, outputName):
    batchtools_path = 'C:/Program Files/Allegorithmic/Substance Automation Toolkit/'
    batchtools_path = os.path.normpath(batchtools_path)
    tool_names = ['sbsbaker', 'sbscooker', 'sbsmutator', 'sbsrender']
    exe_path = {exe: os.path.join(batchtools_path, exe) for exe in tool_names}
    sd_resources_path = os.path.join(batchtools_path, 'resources', 'packages')

    cook_sbsar_cmd = [
    exe_path['sbscooker'],
    "--inputs", sbsPath,
    "--includes", sd_resources_path,
    "--quiet",
    "--size-limit", "13",
    "--output-path", outputPath,
    "--output-name", outputName
    ]
    print(cook_sbsar_cmd)
    run_command_popen(cook_sbsar_cmd)

if __name__ == "__main__":
    inputPath = sys.argv[1]
    outputPath = sys.argv[2]
    outputName = sys.argv[3]
    exportSbsar(inputPath, outputPath, outputName)

In retrospect this could've been called directly from within Unity skipping the python part but I have other scripts where I actually edit the graph before exporting it as a sbsar.

I also tried exporting the sbsar from within Substance Designer having the exact same sbs file as a source and that works well.

Are you sure to give a grayscale background as input to tile_random ?

There are only 3 instances of the tile_random in the graphs and none of them use the background parameter or even the pattern input. I've verified this by looking at the xml as well and there's no mention of the background parameter there.

Code: [Select]
<compInstance>
<path v="pkg:///tile_random?dependency=1290776988"/>
<parameters>
<parameter>
<name v="y_amount"/>
<relativeTo v="0"/>
<paramValue>
<constantValueInt32 v="5"/>
</paramValue>
</parameter>
<parameter>
<name v="x_amount"/>
<relativeTo v="0"/>
<paramValue>
<constantValueInt32 v="2"/>
</paramValue>
</parameter>
<parameter>
<name v="shape_scale_random"/>
<relativeTo v="0"/>
<paramValue>
<constantValueFloat1 v="0.00999999978"/>
</paramValue>
</parameter>
<parameter>
<name v="pattern_color_random"/>
<relativeTo v="0"/>
<paramValue>
<constantValueFloat1 v="1"/>
</paramValue>
</parameter>
<parameter>
<name v="split_threshold"/>
<relativeTo v="0"/>
<paramValue>
<constantValueFloat1 v="0.519999981"/>
</paramValue>
</parameter>
<parameter>
<name v="interstice_amount"/>
<relativeTo v="0"/>
<paramValue>
<constantValueFloat1 v="0.099999994"/>
</paramValue>
</parameter>
</parameters>
<outputBridgings>
<outputBridging>
<uid v="1402602629"/>
<identifier v="output"/>
</outputBridging>
</outputBridgings>
</compInstance>

Code: [Select]
<compInstance>
<path v="pkg:///tile_random?dependency=1290776988"/>
<parameters>
<parameter>
<name v="y_amount"/>
<relativeTo v="0"/>
<paramValue>
<constantValueInt32 v="5"/>
</paramValue>
</parameter>
<parameter>
<name v="x_amount"/>
<relativeTo v="0"/>
<paramValue>
<constantValueInt32 v="2"/>
</paramValue>
</parameter>
<parameter>
<name v="shape_scale_random"/>
<relativeTo v="0"/>
<paramValue>
<constantValueFloat1 v="0.00999999978"/>
</paramValue>
</parameter>
<parameter>
<name v="pattern_color_random"/>
<relativeTo v="0"/>
<paramValue>
<constantValueFloat1 v="0.229999989"/>
</paramValue>
</parameter>
<parameter>
<name v="split_threshold"/>
<relativeTo v="0"/>
<paramValue>
<constantValueFloat1 v="0.519999981"/>
</paramValue>
</parameter>
<parameter>
<name v="interstice_amount"/>
<relativeTo v="0"/>
<paramValue>
<constantValueFloat1 v="0.119999997"/>
</paramValue>
</parameter>
<parameter>
<name v="pattern"/>
<relativeTo v="0"/>
<paramValue>
<constantValueInt32 v="10"/>
</paramValue>
</parameter>
<parameter>
<name v="pattern_specific"/>
<relativeTo v="0"/>
<paramValue>
<constantValueFloat1 v="0.199999988"/>
</paramValue>
</parameter>
<parameter>
<name v="pattern_specific_random"/>
<relativeTo v="0"/>
<paramValue>
<constantValueFloat1 v="0.170000002"/>
</paramValue>
</parameter>
<parameter>
<name v="pattern_rotation_random"/>
<relativeTo v="0"/>
<paramValue>
<constantValueFloat1 v="0.909999967"/>
</paramValue>
</parameter>
<parameter>
<name v="pattern_symmetry_random"/>
<relativeTo v="0"/>
<paramValue>
<constantValueFloat1 v="0.229999989"/>
</paramValue>
</parameter>
</parameters>
<outputBridgings>
<outputBridging>
<uid v="1402602629"/>
<identifier v="output"/>
</outputBridging>
</outputBridgings>
</compInstance>
Code: [Select]
<compInstance>
<path v="pkg:///tile_random?dependency=1290776988"/>
<parameters>
<parameter>
<name v="y_amount"/>
<relativeTo v="0"/>
<paramValue>
<constantValueInt32 v="5"/>
</paramValue>
</parameter>
<parameter>
<name v="x_amount"/>
<relativeTo v="0"/>
<paramValue>
<constantValueInt32 v="2"/>
</paramValue>
</parameter>
<parameter>
<name v="shape_scale_random"/>
<relativeTo v="0"/>
<paramValue>
<constantValueFloat1 v="0.00999999978"/>
</paramValue>
</parameter>
<parameter>
<name v="pattern_color_random"/>
<relativeTo v="0"/>
<paramValue>
<constantValueFloat1 v="0.229999989"/>
</paramValue>
</parameter>
<parameter>
<name v="split_threshold"/>
<relativeTo v="0"/>
<paramValue>
<constantValueFloat1 v="0.519999981"/>
</paramValue>
</parameter>
<parameter>
<name v="interstice_amount"/>
<relativeTo v="0"/>
<paramValue>
<constantValueFloat1 v="0.099999994"/>
</paramValue>
</parameter>
</parameters>
<outputBridgings>
<outputBridging>
<uid v="1402602629"/>
<identifier v="output"/>
</outputBridging>
</outputBridgings>
</compInstance>
</compImplementation>

Hello. Any news on this?

Sorry, can you share with me your problematic sbs file, it will be easier to repro.

Please check your PM
Thanks