OpenUSD icon indicating copy to clipboard operation
OpenUSD copied to clipboard

usdview opens with blank viewport, usdrecord works

Open david-dot-nelson-2-at-sony-dot-com opened this issue 11 months ago • 10 comments

Description of Issue

Hi, I am having issues with usdview after compiling where any usd file from examples HelloWorld, to any other usdz I can successfully view in Blender, Maya, and get images with usdrecord, but my viewer is blank I have attempted with Python39 and Python 311. I hope it's something simple. Thanks in advance for the feedback and guidance. -David.

usdview_issue_2024_03_19

Steps to Reproduce

  1. Downloaded latest git repo
  2. where python (C:\Program Files\Python39\python.exe)
  3. python -m pip install pyopengl
  4. python -m pip install pyside6

System Information (OS, Hardware)

[System Summary]

Item Value OS Name Microsoft Windows 10 Enterprise Version 10.0.19045 Build 19045 Other OS Description Not Available OS Manufacturer Microsoft Corporation System Manufacturer Micro-Star International Co., Ltd. System Model MS-7C60 System Type x64-based PC System SKU To be filled by O.E.M. Processor AMD Ryzen Threadripper 3970X 32-Core Processor, 3700 Mhz, 32 Core(s), 64 Logical Processor(s) BIOS Version/Date American Megatrends International, LLC. 1.60, 5/13/2020 SMBIOS Version 2.8 Embedded Controller Version 255.255 BIOS Mode UEFI BaseBoard Manufacturer Micro-Star International Co., Ltd. BaseBoard Product TRX40 PRO 10G (MS-7C60) BaseBoard Version 1.0 Platform Role Desktop Secure Boot State Off PCR7 Configuration Binding Not Possible Windows Directory C:\WINDOWS System Directory C:\WINDOWS\system32 Boot Device \Device\HarddiskVolume6 Locale United States Hardware Abstraction Layer Version = "10.0.19041.3636" Time Zone Pacific Daylight Time NVIDIA GeForce RTX 3080 OK Installed Physical Memory (RAM) 160 GB Total Physical Memory 160 GB Available Physical Memory 120 GB Total Virtual Memory 328 GB Available Virtual Memory 280 GB Page File Space 168 GB Page File C:\pagefile.sys Kernel DMA Protection Off Virtualization-based security Running Virtualization-based security Required Security Properties Virtualization-based security Available Security Properties Base Virtualization Support, DMA Protection, UEFI Code Readonly, SMM Security Mitigations 1.0, Mode Based Execution Control Virtualization-based security Services Configured Virtualization-based security Services Running Device Encryption Support Reasons for failed automatic device encryption: TPM is not usable, PCR7 binding is not supported, Hardware Security Test Interface failed and device is not Modern Standby, Un-allowed DMA capable bus/device(s) detected, TPM is not usable A hypervisor has been detected. Features required for Hyper-V will not be displayed.

Package Versions

Visual Studio 2022 x64_x86 Cross Tools Command Prompt for VS 2022 Python3.9 or Python3.11 pyopengl in c:\program files\python39\lib\site-packages (3.1.7) pyside6 in c:\program files\python39\lib\site-packages (6.6.2) shiboken6==6.6.2 in c:\program files\python39\lib\site-packages (from pyside6) (6.6.2) PySide6-Essentials==6.6.2 in c:\program files\python39\lib\site-packages (from pyside6) (6.6.2) PySide6-Addons==6.6.2 in c:\program files\python39\lib\site-packages (from pyside6) (6.6.2)

Build Flags


** Visual Studio 2022 Developer Command Prompt v17.9.3 ** Copyright (c) 2022 Microsoft Corporation


[vcvarsall.bat] Environment initialized for: 'x64_x86'

C:\Windows\System32>python d:\Github\OpenUSD\build_scripts\build_usd.py c:\usd

Building with settings: USD source directory d:\Github\OpenUSD USD install directory c:\usd 3rd-party source directory c:\usd\src 3rd-party install directory c:\usd Build directory c:\usd\build CMake generator Default CMake toolset Default Downloader curl

Building Shared libraries Variant Release Target Imaging On Ptex support: Off OpenVDB support: Off OpenImageIO support: Off OpenColorIO support: Off PRMan support: Off UsdImaging On usdview: On Python support On Python Debug: Off Python docs: Off Documentation Off Tests Off Mayapy Tests: Off AnimX Tests: Off Examples On Tutorials On Tools On Alembic Plugin Off HDF5 support: Off Draco Plugin Off MaterialX Plugin On

Dependencies zlib, boost, TBB, MaterialX, OpenSubdiv STATUS: Installing zlib... STATUS: Installing boost... STATUS: Installing TBB... STATUS: Installing MaterialX... STATUS: Installing OpenSubdiv... STATUS: Installing USD...

Success! To use USD, please ensure that you have:

The following in your PYTHONPATH environment variable:
c:\usd\lib\python

The following in your PATH environment variable:
c:\usd\bin
c:\usd\lib

C:\Windows\System32>d:

D:>cd Github\OpenUSD\extras\usd\tutorials\convertingLayerFormats\

D:\Github\OpenUSD\extras\usd\tutorials\convertingLayerFormats>dir Volume in drive D is repo Volume Serial Number is 42F9-757F

Directory of D:\Github\OpenUSD\extras\usd\tutorials\convertingLayerFormats

03/12/2024 11:55 AM <DIR> . 03/12/2024 11:55 AM <DIR> .. 03/12/2024 11:55 AM 142 CMakeLists.txt 03/12/2024 11:55 AM 40 Sphere.usd 03/12/2024 11:55 AM 35 Sphere.usda 3 File(s) 217 bytes 2 Dir(s) 469,877,141,504 bytes free

D:\Github\OpenUSD\extras\usd\tutorials\convertingLayerFormats>usdview Sphere.usda

Filed as internal issue #USD-9466

jesschimein avatar Mar 19 '24 20:03 jesschimein

Is it possible that you have previously overridden some usdview settings, e.g. near clip plane?

What happens if you try: usdview --defaultsettings Sphere.usda?

davidgyu avatar Mar 21 '24 20:03 davidgyu

Encountered this same issue today. Which NVIDIA driver version do you have installed? I had the latest (551.86); changed it to 537.42 (obtained from here: https://www.nvidia.com/Download/Find.aspx?lang=en-us) and the viewport is no longer blank.

hzwus avatar Mar 30 '24 01:03 hzwus

Oh very interesting. This was working fine for me w/ 551.32 (Jan 24) but I also am able to repro w/ 551.86 (Mar 19). Let me see what I can find out...

davidgyu avatar Mar 30 '24 03:03 davidgyu

After some additional testing it seems the essential difference here is PySide2 vs PySide6.

PySide2 support is coming to an end (i.e. it's not available on PyPI for Python 3.11), but it's still what we use for our Python 3.9 testing.

We depend on PySide6 for macOS builds since that's the first release of PySide with support for Apple Silicon, and we've been working to get to parity between PySide2 and PySide6 across the board but we're not fully there yet.

I've been able to test that building OpenUSD on Windows 10 with Python 3.9 or 3.10 and PySide2 5.15.2.1 works as expected w/ the latest NVIDIA 551.86 drivers (and latest AMD or Intel drivers) on recent HW e.g. NVIDIA RTX 4080 (or AMD 7900 XTX or Intel 13900K UHD 770 respectively).

If you have both PySide2 and PySide6 installed, you can coerce build_usd.py to use PySide2 by specifying --build-args USD,"-DPYSIDE_USE_PYSIDE2=TRUE" or similar if you invoke CMake directly.

davidgyu avatar Mar 30 '24 09:03 davidgyu

Is it possible that you have previously overridden some usdview settings, e.g. near clip plane?

What happens if you try: usdview --defaultsettings Sphere.usda?

That was same results unfortunately.

After some additional testing it seems the essential difference here is PySide2 vs PySide6.

PySide2 support is coming to an end (i.e. it's not available on PyPI for Python 3.11), but it's still what we use for our Python 3.9 testing.

We depend on PySide6 for macOS builds since that's the first release of PySide with support for Apple Silicon, and we've been working to get to parity between PySide2 and PySide6 across the board but we're not fully there yet.

I've been able to test that building OpenUSD on Windows 10 with Python 3.9 or 3.10 and PySide2 5.15.2.1 works as expected w/ the latest NVIDIA 551.86 drivers (and latest AMD or Intel drivers) on recent HW e.g. NVIDIA RTX 4080 (or AMD 7900 XTX or Intel 13900K UHD 770 respectively).

If you have both PySide2 and PySide6 installed, you can coerce build_usd.py to use PySide2 by specifying --build-args USD,"-DPYSIDE_USE_PYSIDE2=TRUE" or similar if you invoke CMake directly.

I will give this a try. I have had some conflicts with Houdini 20.653 and usd python from this installation as well from Python 3.9 after compiling USD from the repo here and making it available via sys path.

I will attempt with Python 3.11 since it is in parity with Houdini and your description of current libraries supported.

FWIW, I had no issues with Python 3.11 on Linux and usdview loads fine. I'll post my results later when I get another time slot to do so. Much obliged for your feedback and turnaround. Best regards, -David.

Hey

Was there any solution to this issue yet? As described in: #2996 i have the same issue on Windows with Py3.11 and PySide6 and Nvidia Drivers: 551.86.

Cheers

jonassorgenfrei avatar Apr 10 '24 21:04 jonassorgenfrei

The recommended workaround is to use an earlier version of Qt for Python, i.e. PySide6 6.3.1 or PySide2 5.15.2.1 as described above.

Agree that this seems to be the same bug reported in #2996 and so far has been observed only on Windows when using more recent versions of PySide6.

We describe the versions of software we test with in VERSIONS.md and you can see there that we've still been testing with Python 3.9.x

These recommended versions of PySide appear to work as expected also with Python 3.10 but they are not available on PyPI for Python 3.11 or newer. It seems the broken behavior on Windows started with PySide6 6.4.x.

Thanks!

davidgyu avatar Apr 12 '24 16:04 davidgyu

It looks like there is an issue with glDepthMask state in recent versions of PySide6 and that is the reason for the blank viewport. We've merged a fix internally that works around this issue and we've been able to test with Python 3.11 and PySide6 6.7.1.

This issue will be updated when that workaround is pushed out to GitHub.

davidgyu avatar Jun 06 '24 16:06 davidgyu