Incorrect enum values for wrapS and wrapT on ND_UsdUVTexture_23
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 88/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Domain
- computer-graphics
Research direction
Start in libraries/bxdf/usd_preview_surface.mtlx at the ND_UsdUVTexture_23 definition around lines 41-42, then compare its wrapS and wrapT enums with the ND_image_* definitions in libraries/stdlib/stdlib_defs.mtlx and the mapping around lines 345-356. Done means the enum values consistently match the mapped address-mode inputs, unless an explicit USD-token remapping is added.
Written by the indexing model from the issue text.
Description
Greetings,
Issue
The valid enum values for the wrapS and wrapT inputs on the ND_UsdUVTexture_23 node are listed as:
enum="black,clamp,periodic,mirror"
This seems to be a blend between the valid options from the original UsdUVTexture node, which are:
allowedTokens = ["black", "clamp", "repeat", "mirror", "useMetadata"]
And the options for the uaddressmode and vaddressmode on a regular ND_image_* node, which are:
enum="constant,clamp,periodic,mirror"
Suggested Fix
Considering that the implementation of the ND_UsdUVTexture_23 is based on a ND_image_color4 node and that there is a direct mapping of wrapS -> uaddressmode and wrapT -> vaddressmode, I think the enum values should match those on a normal ND_image_* node.
... unless you have plans to actually accept the tokens from the USD version with some form of remapping.
Cheers!
Affected versions:
This issue is present in the current 1.39.4 version of MaterialX:
https://github.com/AcademySoftwareFoundation/MaterialX/blob/v1.39.4/libraries/bxdf/usd_preview_surface.mtlx#L41-L42
- Dominant language
- C++
- Stars
- 2.3k
- Forks
- 464
- Avg merge
- 4d 13h
- Merged PRs (30d)
- 13
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from AcademySoftwareFoundation/MaterialX
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
AcademySoftwareFoundation/MaterialX#3003 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
AcademySoftwareFoundation/MaterialX#2896 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
All issues in AcademySoftwareFoundation/MaterialX
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-samples#453 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
infiniflow/infinity#3502 ·