Skip to content

Add UsdUVTexture v2.3 variant with vector4 scale and bias#2944

Open
ld-kerley wants to merge 3 commits into
AcademySoftwareFoundation:mainfrom
ld-kerley:usduvtexture-vector4-type-bias-scale
Open

Add UsdUVTexture v2.3 variant with vector4 scale and bias#2944
ld-kerley wants to merge 3 commits into
AcademySoftwareFoundation:mainfrom
ld-kerley:usduvtexture-vector4-type-bias-scale

Conversation

@ld-kerley
Copy link
Copy Markdown
Contributor

Resolves #2895

Introduces ND_UsdUVTexture_23_vector4 nodedef and IMP_UsdUVTexture_23_vector4 nodegraph implementation, where the scale and bias inputs are typed as vector4 instead of the original color4-derived behavior. The prior variant is retained for now for compatibility but could be removed in a future MaterialX release via an upgrade function.

Copy link
Copy Markdown
Contributor

@kwokcb kwokcb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Maybe add an instance of this variant to the existing usd or image sample test files.so can be used for mtlx and usd testing.

ld-kerley added 2 commits May 27, 2026 22:37
Introduces ND_UsdUVTexture_23_vector4 nodedef and IMP_UsdUVTexture_23_vector4
nodegraph implementation, where the `scale` and `bias` inputs are typed as
vector4 instead of the original color4-derived behavior. The prior variant is
retained for now and may be removed in a future MaterialX release via an
upgrade function.
… the nodedefs with the new version can be selected
@ld-kerley ld-kerley force-pushed the usduvtexture-vector4-type-bias-scale branch from fb1c1bc to b3d765b Compare May 28, 2026 05:37
@ld-kerley
Copy link
Copy Markdown
Contributor Author

added unit test - now we have a test that tests UsdUVTexture and also the new typed scale and bias.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple of small items:

  • Both of these and the existing usd_preview_surface_brass_tiled.mtlx in the same folder use the same surfacematerial name USD_Tiled_Brass. Could you give unique names to these new ones so they can be generate uniquely named output folders + image file names. I think they may overwrite each other.
  • For efficiency, could you combine them into 1 file as well, then any further variants will only require a single file update.
    Thanks.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Although I wonder if we can make the test image generation more robust than needing unique names across multiple files?

  • use the filename?
  • have the test system merge all the unit test files together an validate?

Merging these three files in to one also feels a little more fragile - its much easier to just copy the entire file and modify the material - move these to all be in the same file required more care with node naming etc - easier to get wrong?

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.

UsdUVTexture bias and scale port types differ

2 participants