Author Topic: Sbsbaker: Warning: QT_DEVICE_PIXEL_RATIO is deprecated.  (Read 728 times)

I've been trying to get the sbsbaker to work, but after going through installing all the prerequisites I'm getting the following error when trying to run the script with PowerShell. What am I doing wrong?

Code: [Select]
PS C:\Program Files\Allegorithmic\Substance Automation Toolkit\Python API> pip -V
pip 19.3.1 from c:\python27\lib\site-packages\pip (python 2.7)
PS C:\Program Files\Allegorithmic\Substance Automation Toolkit\Python API> python -m pip install Pysbs-2019.2.3.zip
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Processing c:\program files\allegorithmic\substance automation toolkit\python api\pysbs-2019.2.3.zip
Installing collected packages: Pysbs
  Found existing installation: Pysbs 2019.2.3
    Uninstalling Pysbs-2019.2.3:
      Successfully uninstalled Pysbs-2019.2.3
    Running setup.py install for Pysbs ... done
Successfully installed Pysbs-2019.2.3
PS C:\Program Files\Allegorithmic\Substance Automation Toolkit\Python API> Set-Location "C:\Program Files\Allegorithmic\Substance Automation Toolkit"
PS C:\Program Files\Allegorithmic\Substance Automation Toolkit> .\sbsbaker.exe ambient-occlusion "D:\Download\Bake Test\ORT3500A hus.fbx" --output-size 10,10
Warning: QT_DEVICE_PIXEL_RATIO is deprecated. Instead use:
   QT_AUTO_SCREEN_SCALE_FACTOR to enable platform plugin controlled per-screen factors.
   QT_SCREEN_SCALE_FACTORS to set per-screen factors.
   QT_SCALE_FACTOR to set the application global scale factor.
PS C:\Program Files\Allegorithmic\Substance Automation Toolkit>

Hi,

For clarity, is the warning the issue or does the baking fail in that no output file is written?

David

No file is output, I just get the error.

Is it possible for you to share a sample scene?

I'm not sure what I can really share? All I'm doing is using PowerShell and pointing it to an FBX.
I've even tried running it on the Big_Rock.fbx located inside the SAT sample folder, I get the same error.

It seems like I'm doing something wrong if I get those errors, but I'm not at all sure what I can do to fix it.

Just jumping in here as I've encountered the QT_DEVICE_PIXEL_RATIO warning before (unrelated to SAT) and it can often be innocuous (not saying it's the case here).

Out of curiousity, can you run your command with --verbose to see if any relevant details are provided regarding the output?
Code: [Select]
.\sbsbaker.exe ambient-occlusion "D:\Download\Bake Test\ORT3500A hus.fbx" --output-size 10,10 --verbose
Have you also tried baking with the --output-path command, in case it's a permissions issue?

I was wrong a file actually did get output either way, just not where I was expecting it to show up.
And the verbose command does indeed show that. So I guess it does actually work, just shows that error every time for some unknown reason. Thanks for the help.

Code: [Select]
PS C:\Program Files\Allegorithmic\Substance Automation Toolkit> .\sbsbaker.exe ambient-occlusion "D:\Download\Bake Test\ORG3500A Legehus.fbx" --output-size 10,10 --verbose
Warning: QT_DEVICE_PIXEL_RATIO is deprecated. Instead use:
   QT_AUTO_SCREEN_SCALE_FACTOR to enable platform plugin controlled per-screen factors.
   QT_SCREEN_SCALE_FACTORS to set per-screen factors.
   QT_SCALE_FACTOR to set the application global scale factor.
[INFO][BakersSEAO Gl Render]Occlusion pass 0:
[INFO][BakersSEAO Gl Render]    Compute time: 1.1e-06
[INFO][BakersSEAO Gl Render]Occlusion pass 1:
[INFO][BakersSEAO Gl Render]    Compute time: 8e-07
[INFO][BakersSEAO Gl Render]Occlusion pass 2:
[INFO][BakersSEAO Gl Render]    Compute time: 1.4e-06
[INFO][BakersSEAO Gl Render]Occlusion pass 3:
[INFO][BakersSEAO Gl Render]    Compute time: 1.1e-06
[INFO][BakersSEAO Gl Render]Occlusion pass 4:
[INFO][BakersSEAO Gl Render]    Compute time: 9e-07
[INFO][BakersSEAO Gl Render]Pass (looplimit: 600000)
[INFO][BakersSEAO Gl Render]    Active fragments: 0
[INFO][SBSBaker]Writing file 'C:/Program Files/Allegorithmic/Substance Automation Toolkit/ORG3500A Legehus_ambient-occlusion.png'...
PS C:\Program Files\Allegorithmic\Substance Automation Toolkit>

It outputs to current directory if no output path is provided.

Are you using a 4k or other high dpi monitor by chance?
My guess is that's what's triggering your QT_DEVICE_PIXEL_RATIO warning.
Either way it's safe to ignore on your end.

Yeah I'm using a 2560x1440 monitor.

Figured as much; it's something in the QT5 library probably triggering it on initialization via SAT.

I would say it's safe to ignore it unless Adobe/Allegorithmic says otherwise.