• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers

Export 8K textures via Python API

New Here ,
Jul 21, 2022 Jul 21, 2022

Copy link to clipboard

Copied

We would like to automate our texture exports from Painter via Python.

This works well via substance_painter.export.export_project_textures(settings).

The `settings` look something like this:

{
  exportPath: "C:/test/",
  exportShaderParams: false,
  defaultExportPreset: "My_Preset",
  exportPresets: [{
    name: "My_Preset",
    maps: [{
      fileName: "/v001/asset_test/asset_test_v001_color(.$udim)",
      channels: [
        { destChannel: "R", srcChannel: "R",
          srcMapType: "documentMap", srcMapName: "baseColor"},
        { destChannel: "G", srcChannel: "G",
          srcMapType: "documentMap", srcMapName: "baseColor"},
        { destChannel: "B", srcChannel: "B",
          srcMapType: "documentMap", srcMapName: "baseColor"}
      ]}, {
        fileName: "/v001/asset_test/asset_test_v001_metalness(.$udim)",
        channels: [{
          destChannel: "L", srcChannel: "L",
          srcMapType: "documentMap", srcMapName: "metallic"
        }]
      }, {
        fileName: "/v001/asset_test/asset_test_v001_normal(.$udim)",
        channels: [
          { destChannel: "R", srcChannel: "R",
            srcMapType: "virtualMap", srcMapName: "Normal_OpenGL"},
          { destChannel: "G", srcChannel: "G",
            srcMapType: "virtualMap", srcMapName: "Normal_OpenGL"},
          { destChannel: "B", srcChannel: "B",
            srcMapType: "virtualMap", srcMapName: "Normal_OpenGL"}
        ]
      }]
  }],
  exportParameters: [{
    parameters: {
      fileFormat: "exr",
      bitDepth: "32f",
      dithering: false,
      paddingAlgorithm: "infinite"
    }
  }],
  exportList: [{
    rootPath: "asset_test",
    exportPreset: "My_Preset"
  }]
}

 What we're missing now is a resolution setting. We tried adding it to exportParameters.parameters like this:
resolution: { width: 8192, height: 8192 }
but that doesn't work. Any hints?

TOPICS
Import & Export

Views

57

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 11, 2022 Oct 11, 2022

Copy link to clipboard

Copied

LATEST

In version 8.2.0, this works:

exportParameters: [{
    parameters: {
      fileFormat: "exr",
      bitDepth: "32f",
      dithering: false,
      paddingAlgorithm: "infinite",
      sizeLog2: 13
    }
  }]

It's still not possible to set individual texture set resolutions to 8K via the UI or substance_painter.textureset.set_resolutions. Any change the max allowed resolution could be bumped up to that?

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources