Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added first set of texture file format tests #88

Merged
merged 4 commits into from
Jun 12, 2024

Conversation

AlexSchwank
Copy link
Contributor

@AlexSchwank AlexSchwank commented May 15, 2024

  • JPEG, CMYK, 8-bit
  • JPEG, RGB, 8-bit
  • JPEG, Grayscale, 8-bit
  • PNG, Grayscale 8-bit
  • PNG, Grayscale, 16-bit
  • PNG, RGB, 8-bit
  • PNG, RGB, 16-bit
  • PNG, RGB, 32-bit

@AlexSchwank AlexSchwank requested review from meshula and jcowles May 15, 2024 06:01
@AlexSchwank
Copy link
Contributor Author

I'll add the source PSD after the group has discussed if this is good to go.

@meshula
Copy link
Contributor

meshula commented May 15, 2024

This looks great :)

Would it would be possible to attach in a readme perhaps, a little snippet of code (Python? C++? doesn't really matter) to generate the color and grayscale strip for the top scanline? That would allow the construction of unit tests that procedurally generate the gradient, open the image file, and then do a variety of baseline metrics versus expected values.

If the images were generated using photoshop tools, could I request that we generate the gradients procedurally instead? This would really help in tracing down one bit encoding errors that sometimes occur with formats like jpeg.

@jcowles
Copy link
Collaborator

jcowles commented May 15, 2024

hmm, lots of errors in like this Run usdchecker:

Checking test_assets/TextureFileFormatTests/png_rgb_8-bit.usda
Traceback (most recent call last):
  File ".github/usdchecker.py", line 149, in <module>
    sys.exit(main())
  File ".github/usdchecker.py", line 118, in main
    checker.CheckCompliance(inputFile)
  File "/home/runner/.local/lib/python3.7/site-packages/pxr/UsdUtils/complianceChecker.py", line 1138, in CheckCompliance
    self._TraverseRange(allPrimsIt, isStageRoot=True)
  File "/home/runner/.local/lib/python3.7/site-packages/pxr/UsdUtils/complianceChecker.py", line 1196, in _TraverseRange
    self._CheckPrim(prim)
  File "/home/runner/.local/lib/python3.7/site-packages/pxr/UsdUtils/complianceChecker.py", line 1[182](https://github.com/usd-wg/assets/actions/runs/8251260090/job/22567886066?pr=80#step:7:183), in _CheckPrim
    rule.CheckPrim(prim)
  File "/home/runner/.local/lib/python3.7/site-packages/pxr/UsdUtils/complianceChecker.py", line 714, in CheckPrim
    Sdr.Registry().GetShaderNodeByIdentifier(shaderId)
pxr.Tf.ErrorException: 
	Error in 'pxrInternal_v0_24__pxrReserved__::_GetShaderResourcePath' at line 53 in file /opt/USD/pxr/usd/usdHydra/discoveryPlugin.cpp : 'Failed verification: ' !path.empty() ' -- Could not find shader resource: shaderDefs.usda

@meshula
Copy link
Contributor

meshula commented May 16, 2024

@jcowles Is there an error in the checker? It's reporting

pxr.Tf.ErrorException: 
	Error in 'pxrInternal_v0_24__pxrReserved__::_GetShaderResourcePath' at line 53 in file /opt/USD/pxr/usd/usdHydra/discoveryPlugin.cpp : 'Failed verification: ' !path.empty() ' -- Could not find shader resource: shaderDefs.usda

but shaderDefs.usda isn't something originating with this PR. (Or I can't spot it)

@jcowles
Copy link
Collaborator

jcowles commented May 16, 2024

not sure what's happening there

@AlexSchwank
Copy link
Contributor Author

AlexSchwank commented May 16, 2024

PixarAnimationStudios/OpenUSD#3055

Description of Issue
usdchecker now has tests that depend on usdShaders, introducing an (indirect) dependency on imaging.
This means that tests cannot successfully complete when building without imaging.

@pablode pablode mentioned this pull request May 16, 2024
@pablode
Copy link
Contributor

pablode commented May 16, 2024

I tried manually copying the relevant file, but it doesn't seem that easy to fix. We could lock usdchecker at v24.03 until this issue is resolved - I've set up the PR above.

@AlexSchwank
Copy link
Contributor Author

Thanks @pablode . Happy to lock the USD version to a specific one.

@jcowles
Copy link
Collaborator

jcowles commented May 16, 2024

@AlexSchwank mind merging main (or rebasing) into your branch and pushing again to this to get it to re-run usdchecker?

(I tried just hitting re-run, but I think it's running against the version of main your branch is at)

@jcowles jcowles merged commit 7dabe2d into usd-wg:main Jun 12, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants